Skip to content

Commit 1f2dbac

Browse files
Merge pull request #5602 from sergiordlr/ocp_2090_migrate_nodedisruptionpolicy_tests
MCO-2090: migrate nodedisruptionpolicy tests from the private reposit…
2 parents 6ae92a8 + 23c15b3 commit 1f2dbac

7 files changed

Lines changed: 811 additions & 12 deletions

File tree

test/extended-priv/const.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,12 @@ const (
8787
BusyBoxImage = "quay.io/openshifttest/busybox@sha256:c5439d7db88ab5423999530349d327b04279ad3161d7596d2126dfb5b02bfd1f"
8888
// AlpineImage the multiplatform alpine image stored in openshifttest
8989
AlpineImage = "quay.io/openshifttest/alpine@sha256:dc1536cbff0ba235d4219462aeccd4caceab9def96ae8064257d049166890083"
90+
91+
// Constants for NodeDisruptionPolicy
92+
NodeDisruptionPolicyActionNone = "None"
93+
NodeDisruptionPolicyActionReboot = "Reboot"
94+
NodeDisruptionPolicyActionReload = "Reload"
95+
NodeDisruptionPolicyActionRestart = "Restart"
96+
NodeDisruptionPolicyActionDrain = "Drain"
97+
NodeDisruptionPolicyActionDaemonReload = "DaemonReload"
9098
)

test/extended-priv/mco_machineconfignode.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,25 @@ var _ = g.Describe("[sig-mco][Suite:openshift/machine-config-operator/longdurati
105105
o.Eventually(mcn.GetDrained, "1m", "2s").Should(o.Equal("Unknown"))
106106
logger.Infof("Checking Drained")
107107
o.Eventually(mcn.GetDrained, "5m", "2s").Should(o.Equal("True"))
108-
logger.Infof("Checking AppliedFilesAndOS Unknown")
109-
o.Eventually(mcn.GetAppliedFilesAndOS, "1m", "1s").Should(o.Equal("Unknown"))
108+
// This transition is too fast and we can't check it without introducing instability. It is left commented so that we know that this transition exists.
109+
// logger.Infof("Checking AppliedFilesAndOS Unknown")
110+
// o.Eventually(mcn.GetAppliedFilesAndOS, "1m", "1s").Should(o.Equal("Unknown"))
110111
logger.Infof("Checking AppliedFilesAndOS")
111112
o.Eventually(mcn.GetAppliedFilesAndOS, "3m", "2s").Should(o.Equal("True"))
112113
logger.Infof("Checking UpdateExecuted")
113114
o.Eventually(mcn.GetUpdateExecuted, "20s", "5s").Should(o.Equal("True"))
114115
logger.Infof("Checking RebootedNode Unknown")
115116
o.Eventually(mcn.GetRebootedNode, "15s", "3s").Should(o.Equal("Unknown"))
116117
logger.Infof("Checking RebootedNode")
117-
o.Eventually(mcn.GetRebootedNode, "5m", "5s").Should(o.Equal("True"))
118+
o.Eventually(mcn.GetRebootedNode, "5m", "2s").Should(o.Equal("True"))
118119
logger.Infof("Checking Resumed")
119-
o.Eventually(mcn.GetResumed, "15s", "5s").Should(o.Equal("True"))
120+
o.Eventually(mcn.GetResumed, "45s", "1s").Should(o.Equal("True"))
120121
logger.Infof("Checking UpdateComplete")
121-
o.Eventually(mcn.GetUpdateComplete, "10s", "5s").Should(o.Equal("True"))
122+
o.Eventually(mcn.GetUpdateComplete, "40s", "1s").Should(o.Equal("True"))
122123
logger.Infof("Checking Uncordoned")
123-
o.Eventually(mcn.GetUncordoned, "10s", "2s").Should(o.Equal("True"))
124+
o.Eventually(mcn.GetUncordoned, "40s", "1s").Should(o.Equal("True"))
124125
logger.Infof("Checking Updated")
125-
o.Eventually(mcn.GetUpdated, "1m", "5s").Should(o.Equal("True"))
126+
o.Eventually(mcn.GetUpdated, "1m", "1s").Should(o.Equal("True"))
126127

127128
})
128129

0 commit comments

Comments
 (0)