forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstability_test.go
32 lines (25 loc) · 902 Bytes
/
stability_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package tests_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"kubevirt.io/client-go/kubecli"
"kubevirt.io/kubevirt/tests"
cd "kubevirt.io/kubevirt/tests/containerdisk"
)
var _ = PDescribe("Ensure stable functionality", func() {
var err error
var virtClient kubecli.KubevirtClient
BeforeEach(func() {
virtClient, err = kubecli.GetKubevirtClient()
tests.PanicOnError(err)
tests.BeforeTestCleanup()
})
Measure("by repeately starting vmis many times without issues", func(b Benchmarker) {
b.Time("from_start_to_ready", func() {
vmi := tests.NewRandomVMIWithEphemeralDiskAndUserdata(cd.ContainerDiskFor(cd.ContainerDiskCirros), "#!/bin/bash\necho 'hello'\n")
vmi, err := virtClient.VirtualMachineInstance(tests.NamespaceTestDefault).Create(vmi)
Expect(err).To(BeNil(), "Create VMI successfully")
tests.WaitForSuccessfulVMIStart(vmi)
})
}, 15)
})