@@ -18,8 +18,7 @@ import (
18
18
19
19
func AllMachineSetTest (oc * exutil.CLI , fixture string ) {
20
20
// This fixture applies a boot image update configuration that opts in all machinesets
21
- err := oc .Run ("apply" ).Args ("-f" , fixture ).Execute ()
22
- o .Expect (err ).NotTo (o .HaveOccurred ())
21
+ ApplyBootImageFixture (oc , fixture )
23
22
24
23
// Step through all machinesets and verify boot images are reconciled correctly.
25
24
machineClient , err := machineclient .NewForConfig (oc .KubeFramework ().ClientConfig ())
@@ -35,11 +34,7 @@ func AllMachineSetTest(oc *exutil.CLI, fixture string) {
35
34
func PartialMachineSetTest (oc * exutil.CLI , fixture string ) {
36
35
37
36
// This fixture applies a boot image update configuration that opts in any machineset with the label test=boot
38
- err := oc .Run ("apply" ).Args ("-f" , fixture ).Execute ()
39
- o .Expect (err ).NotTo (o .HaveOccurred ())
40
-
41
- // Ensure status accounts for the fixture that was applied
42
- WaitForMachineConfigurationStatusUpdate (oc )
37
+ ApplyBootImageFixture (oc , fixture )
43
38
44
39
// Pick a random machineset to test
45
40
machineClient , err := machineclient .NewForConfig (oc .KubeFramework ().ClientConfig ())
@@ -66,11 +61,7 @@ func PartialMachineSetTest(oc *exutil.CLI, fixture string) {
66
61
67
62
func NoneMachineSetTest (oc * exutil.CLI , fixture string ) {
68
63
// This fixture applies a boot image update configuration that opts in no machinesets, i.e. feature is disabled.
69
- err := oc .Run ("apply" ).Args ("-f" , fixture ).Execute ()
70
- o .Expect (err ).NotTo (o .HaveOccurred ())
71
-
72
- // Ensure status accounts for the fixture that was applied
73
- WaitForMachineConfigurationStatusUpdate (oc )
64
+ ApplyBootImageFixture (oc , fixture )
74
65
75
66
// Step through all machinesets and verify boot images are reconciled correctly.
76
67
machineClient , err := machineclient .NewForConfig (oc .KubeFramework ().ClientConfig ())
@@ -86,11 +77,7 @@ func NoneMachineSetTest(oc *exutil.CLI, fixture string) {
86
77
func DegradeOnOwnerRefTest (oc * exutil.CLI , fixture string ) {
87
78
e2eskipper .Skipf ("This test is temporarily disabled until boot image skew enforcement is implemented" )
88
79
// This fixture applies a boot image update configuration that opts in all machinesets
89
- err := oc .Run ("apply" ).Args ("-f" , fixture ).Execute ()
90
- o .Expect (err ).NotTo (o .HaveOccurred ())
91
-
92
- // Ensure status accounts for the fixture that was applied
93
- WaitForMachineConfigurationStatusUpdate (oc )
80
+ ApplyBootImageFixture (oc , fixture )
94
81
95
82
// Pick a random machineset to test
96
83
machineClient , err := machineclient .NewForConfig (oc .KubeFramework ().ClientConfig ())
0 commit comments