Skip to content

Commit

Permalink
Fix moving route ip to bridge test
Browse files Browse the repository at this point in the history
- Upgrade kubevirtci, has some fixes for tun/tap qemu interfaces
- Fix vlans check
- Make ginkgo verbose at stdci
  • Loading branch information
qinqon committed Sep 23, 2019
1 parent 3926c1c commit 510bed7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ trap teardown EXIT SIGINT SIGTERM SIGSTOP
make cluster-down
make cluster-up
make cluster-sync
make E2E_TEST_EXTRA_ARGS="-ginkgo.noColor" test/e2e
make E2E_TEST_EXTRA_ARGS="-ginkgo.v -ginkgo.noColor" test/e2e
2 changes: 1 addition & 1 deletion hack/install-kubevirtci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

organization=kubevirt
commit="1c2922cd9ebaabf7006dc68aa8df70ad84d96d4b"
commit="db8c24bf830bb927f01829e6c9f083627fe6b832"

script_dir=$(dirname "$(readlink -f "$0")")
kubevirtci_dir=kubevirtci
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/default_bridged_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func(
type: linux-bridge
state: absent
`)
// FIXME: This is a pending spec since we have to discover why the
// cluster never goes back at kubevirtci provider
XContext("when there is a default interface with dynamic address", func() {
Context("when there is a default interface with dynamic address", func() {
addressByNode := map[string]string{}
BeforeEach(func() {
By("Check eth0 is the default route interface and has dynamic address")
Expand All @@ -61,7 +59,8 @@ var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func(
for _, node := range nodes {
address := ""
Eventually(func() string {
return ipv4Address(node, "eth0")
address = ipv4Address(node, "eth0")
return address
}, 15*time.Second, 1*time.Second).ShouldNot(BeEmpty(), "Interface eth0 has no ipv4 address")
addressByNode[node] = address
}
Expand All @@ -70,6 +69,9 @@ var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func(
By("Removing bridge and configuring eth0 with dhcp")
setDesiredStateWithPolicy("default-network", resetDefaultInterface)

By("Waiting until the node becomes ready again")
waitForNodesReady()

By("Check eth0 has the default ip address")
for _, node := range nodes {
Eventually(func() string {
Expand All @@ -81,12 +83,9 @@ var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func(
for _, node := range nodes {
Eventually(func() string {
return defaultRouteNextHopInterface(node)
}, 30*time.Second, 1*time.Second).Should(Equal("eth0"))
}, 15*time.Second, 1*time.Second).Should(Equal("eth0"))
}

By("Waiting until the node becomes ready again")
waitForNodesReady()

By("Remove the policy")
deletePolicy("default-network")
})
Expand All @@ -109,11 +108,11 @@ var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func(
for _, node := range nodes {
Eventually(func() string {
return defaultRouteNextHopInterface(node)
}, 30*time.Second, 1*time.Second).Should(Equal("brext"))
}, 15*time.Second, 1*time.Second).Should(Equal("brext"))

By("Verify that VLAN configuration is done properly")
hasVlans(node, "eth0", 2, 4094).Should(Succeed())
hasVlans(node, "brext", 1, 1).Should(Succeed())
vlansCardinality(node, "brext").Should(Equal(0))
}
})
})
Expand Down Expand Up @@ -158,6 +157,7 @@ func nodeReadyConditionStatus(nodeName string) (corev1.ConditionStatus, error) {
}

func waitForNodesReady() {
time.Sleep(5 * time.Second)
for _, node := range nodes {
Eventually(func() (corev1.ConditionStatus, error) {
return nodeReadyConditionStatus(node)
Expand Down

0 comments on commit 510bed7

Please sign in to comment.