Skip to content

Commit 6bcd0b1

Browse files
committed
test(e2e): do not require kubetest configration if not needed
Even if conformance tests are skipped, the kubetest configuration is still required and expected to exist
1 parent 4d7fffc commit 6bcd0b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/e2e/cluster_upgrade.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
112112
Expect(input.E2EConfig.Variables).To(HaveKey(KubernetesVersionUpgradeFrom))
113113
Expect(input.E2EConfig.Variables).To(HaveKey(KubernetesVersionUpgradeTo))
114114

115-
Expect(input.E2EConfig.Variables).To(HaveKey(kubetestConfigurationVariable), "% spec requires a %s variable to be defined in the config file", specName, kubetestConfigurationVariable)
116-
kubetestConfigFilePath = input.E2EConfig.MustGetVariable(kubetestConfigurationVariable)
117-
Expect(kubetestConfigFilePath).To(BeAnExistingFile(), "%s should be a valid kubetest config file")
115+
if !input.SkipConformanceTests {
116+
Expect(input.E2EConfig.Variables).To(HaveKey(kubetestConfigurationVariable), "% spec requires a %s variable to be defined in the config file", specName, kubetestConfigurationVariable)
117+
kubetestConfigFilePath = input.E2EConfig.MustGetVariable(kubetestConfigurationVariable)
118+
Expect(kubetestConfigFilePath).To(BeAnExistingFile(), "%s should be a valid kubetest config file")
119+
}
118120

119121
if input.ControlPlaneMachineCount == nil {
120122
controlPlaneMachineCount = 1

0 commit comments

Comments
 (0)