Skip to content

Commit

Permalink
Reorder tests to avoid: kubectl get nodes reports outdated info cau…
Browse files Browse the repository at this point in the history
…ses test failure.

Signed-off-by: Ling Samuel <[email protected]>
  • Loading branch information
lingsamuel committed Jan 11, 2021
1 parent 8ca38c3 commit b7d8082
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion test/integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var testdataDir = flag.String("testdata-dir", "testdata", "the directory relativ
const (
SecondNodeName = "m02"
ThirdNodeName = "m03"
FourthNodeName = "m04"
)

// TestMain is the test main
Expand Down
11 changes: 7 additions & 4 deletions test/integration/multinode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ func TestMultiNode(t *testing.T) {
validator validatorFunc
}{
{"FreshStart2Nodes", validateMultiNodeStart},
// Add worker node
{"AddNode", validateAddNodeToMultiNode},
{"StopNode", validateStopRunningNode(ThirdNodeName)},
{"AddControlPlaneNode", validateAddControlPlaneNodeToMultiNode},
{"StopControlPlaneNode", validateStopRunningNode(FourthNodeName)},
{"StartAfterStop", validateStartNodeAfterStop(ThirdNodeName)},
{"StartControlPlaneAfterStop", validateStartNodeAfterStop(FourthNodeName)},
{"DeleteNode", validateDeleteNodeFromMultiNode(ThirdNodeName, true)},
{"DeleteControlPlaneNode", validateDeleteNodeFromMultiNode(FourthNodeName, true)},
// Add control plane node
{"AddControlPlaneNode", validateAddControlPlaneNodeToMultiNode},
{"StopControlPlaneNode", validateStopRunningNode(ThirdNodeName)},
{"StartControlPlaneAfterStop", validateStartNodeAfterStop(ThirdNodeName)},
{"DeleteControlPlaneNode", validateDeleteNodeFromMultiNode(ThirdNodeName, true)},
// Test cluster stop && start
{"StopMultiNode", validateStopMultiNodeCluster},
{"RestartMultiNode", validateRestartMultiNodeCluster},
}
Expand Down

0 comments on commit b7d8082

Please sign in to comment.