Skip to content

Commit

Permalink
DNM: Run the e2e regression at mutiple nodes in parallel to check sta…
Browse files Browse the repository at this point in the history
…bility

Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon committed Sep 27, 2019
1 parent d8692bb commit fc08e47
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifdef UNIT_TEST_EXTRA_ARGS
UNIT_TEST_ARGS += $(UNIT_TEST_ARGS)
endif

E2E_TEST_ARGS ?= -test.v -test.timeout=20m -ginkgo.v -ginkgo.slowSpecThreshold=60
E2E_TEST_ARGS ?= -test.v -test.timeout=40m -ginkgo.v -ginkgo.slowSpecThreshold=60
ifdef E2E_TEST_FOCUS
E2E_TEST_ARGS += -ginkgo.focus $(E2E_TEST_FOCUS)
endif
Expand Down
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-1.mounts
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-1.packages
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-1.sh
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-2.mounts
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-2.packages
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-2.sh
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-3.mounts
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-3.packages
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-3.sh
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-4.mounts
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-4.packages
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-4.sh
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-5.mounts
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-5.packages
1 change: 1 addition & 0 deletions automation/check-patch.k8s-1.14.6-5.sh
2 changes: 1 addition & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ teardown() {
make cluster-down
}

export KUBEVIRT_PROVIDER=$TARGET
export KUBEVIRT_PROVIDER=$(echo $TARGET| sed "s/6-.*/6/")

# Make sure that the VM is properly shut down on exit
trap teardown EXIT SIGINT SIGTERM SIGSTOP
Expand Down
5 changes: 5 additions & 0 deletions stdci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
sub-stages:
- k8s-1.14.6
- k8s-1.14.6-1
- k8s-1.14.6-2
- k8s-1.14.6-3
- k8s-1.14.6-4
- k8s-1.14.6-5
- os-3.11.0

runtime_requirements:
Expand Down
10 changes: 6 additions & 4 deletions test/e2e/default_bridged_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
nmstatev1alpha1 "github.com/nmstate/kubernetes-nmstate/pkg/apis/nmstate/v1alpha1"
)

var _ = Describe("NodeNetworkConfigurationPolicy default bridged network", func() {
var _ = PDescribe("NodeNetworkConfigurationPolicy default bridged network", func() {
createBridgeOnTheDefaultInterface := nmstatev1alpha1.State(`interfaces:
- name: brext
type: linux-bridge
Expand Down Expand Up @@ -142,7 +142,9 @@ func dhcpFlag(node string, name string) bool {
func nodeReadyConditionStatus(nodeName string) (corev1.ConditionStatus, error) {
key := types.NamespacedName{Name: nodeName}
node := corev1.Node{}
err := framework.Global.Client.Get(context.TODO(), key, &node)
oneSecondTimeoutCtx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
err := framework.Global.Client.Get(oneSecondTimeoutCtx, key, &node)
if err != nil {
return "", err
}
Expand All @@ -157,8 +159,8 @@ func nodeReadyConditionStatus(nodeName string) (corev1.ConditionStatus, error) {
func waitForNodesReady() {
time.Sleep(5 * time.Second)
for _, node := range nodes {
Eventually(func() (corev1.ConditionStatus, error) {
EventuallyWithOffset(1, func() (corev1.ConditionStatus, error) {
return nodeReadyConditionStatus(node)
}, 60*time.Second, 1*time.Second).Should(Equal(corev1.ConditionTrue))
}, 30*time.Minute, 10*time.Second).Should(Equal(corev1.ConditionTrue))
}
}
6 changes: 6 additions & 0 deletions test/e2e/nns_conditions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ var _ = Describe("NodeNetworkStateCondition", func() {
BeforeEach(func() {
updateDesiredState(invalidConfig)
})
AfterEach(func() {
updateDesiredState(br1Absent)
for _, node := range nodes {
interfacesNameForNode(node).ShouldNot(ContainElement("br1"))
}
})
It("should have Failing ConditionType set to true", func() {
for _, node := range nodes {
checkCondition(node, nmstatev1alpha1.NodeNetworkStateConditionFailing).Should(
Expand Down

0 comments on commit fc08e47

Please sign in to comment.