-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cdd9ad8
commit fb0a7f4
Showing
11 changed files
with
77 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package e2e | ||
|
||
import ( | ||
"regexp" | ||
|
||
"sigs.k8s.io/cluster-api/test/framework" | ||
"sigs.k8s.io/cluster-api/test/framework/bootstrap" | ||
"sigs.k8s.io/cluster-api/test/framework/clusterctl" | ||
) | ||
|
||
const ( | ||
kubesystem = "kube-system" | ||
activitylog = "azure-activity-logs" | ||
) | ||
|
||
// Test suite flags | ||
var ( | ||
// configPath is the path to the e2e config file. | ||
configPath string | ||
|
||
// useExistingCluster instructs the test to use the current cluster instead of creating a new one (default discovery rules apply). | ||
useExistingCluster bool | ||
|
||
// artifactFolder is the folder to store e2e test artifacts. | ||
artifactFolder string | ||
|
||
// skipCleanup prevents cleanup of test resources e.g. for debug purposes. | ||
skipCleanup bool | ||
) | ||
|
||
// Test suite global vars | ||
var ( | ||
// e2eConfig to be used for this test, read from configPath. | ||
e2eConfig *clusterctl.E2EConfig | ||
|
||
// clusterctlConfigPath to be used for this test, created by generating a clusterctl local repository | ||
// with the providers specified in the configPath. | ||
clusterctlConfigPath string | ||
|
||
// bootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests. | ||
// Please note that provisioning will be skipped if e2e.use-existing-cluster is provided. | ||
bootstrapClusterProvider bootstrap.ClusterProvider | ||
|
||
// bootstrapClusterProxy allows to interact with the bootstrap cluster to be used for the e2e tests. | ||
bootstrapClusterProxy framework.ClusterProxy | ||
|
||
// kubetestConfigFilePath is the path to the kubetest configuration file | ||
kubetestConfigFilePath string | ||
|
||
// kubetestRepoListPath | ||
kubetestRepoListPath string | ||
|
||
// useCIArtifacts specifies whether or not to use the latest build from the main branch of the Kubernetes repository | ||
useCIArtifacts bool | ||
|
||
// usePRArtifacts specifies whether or not to use the build from a PR of the Kubernetes repository | ||
usePRArtifacts bool | ||
) | ||
|
||
// validateStableReleaseString validates the string format that declares "get be the latest stable release for this <Major>.<Minor>" | ||
// it should be called wherever we process a stable version string expression like "stable-1.22" | ||
func validateStableReleaseString(stableVersion string) (bool, []string) { | ||
stableReleaseFormat := regexp.MustCompile(`^stable-(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$`) | ||
matches := stableReleaseFormat.FindStringSubmatch(stableVersion) | ||
return len(matches) > 0, matches | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
Copyright 2021 The Kubernetes Authors. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
|