Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions tests/e2e/vm_vpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ import (
kc "github.com/deckhouse/virtualization/tests/e2e/kubectl"
)

func WaitVMNetworkReady(opts kc.WaitOptions) {
func WaitForVMNetworkReady(opts kc.WaitOptions) {
GinkgoHelper()
WaitPhaseByLabel(kc.ResourceVM, PhaseRunning, opts)
WaitConditionIsTrueByLabel(kc.ResourceVM, vmcondition.TypeNetworkReady.String(), opts)
}

func WaitForVMRunningPhase(opts kc.WaitOptions) {
GinkgoHelper()
WaitPhaseByLabel(kc.ResourceVM, PhaseRunning, opts)
}

var _ = Describe("VirtualMachineAdditionalNetworkInterfaces", SIGMigration(), ginkgoutil.CommonE2ETestDecorators(), func() {
testCaseLabel := map[string]string{"testcase": "vm-vpc"}
var ns string
Expand Down Expand Up @@ -84,16 +88,16 @@ var _ = Describe("VirtualMachineAdditionalNetworkInterfaces", SIGMigration(), gi

Context("When virtual machines are applied", func() {
It("checks VMs phases", func() {
By("Virtual machine agents should be ready")
WaitVMAgentReady(kc.WaitOptions{
By("Virtual machine should be running")
WaitForVMRunningPhase(kc.WaitOptions{
Labels: testCaseLabel,
Namespace: ns,
Timeout: MaxWaitTimeout,
})
})
It("checks network availability", func() {
By("Network condition should be true")
WaitVMNetworkReady(kc.WaitOptions{
WaitForVMNetworkReady(kc.WaitOptions{
Labels: testCaseLabel,
Namespace: ns,
Timeout: MaxWaitTimeout,
Expand Down Expand Up @@ -151,7 +155,7 @@ var _ = Describe("VirtualMachineAdditionalNetworkInterfaces", SIGMigration(), gi

It("checks network availability after migrations", func() {
By("Network condition should be true")
WaitVMNetworkReady(kc.WaitOptions{
WaitForVMNetworkReady(kc.WaitOptions{
Labels: testCaseLabel,
Namespace: ns,
Timeout: MaxWaitTimeout,
Expand Down
Loading