-
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
c444fdb
commit 50a5172
Showing
11 changed files
with
96 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,85 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
Copyright 2021 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
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 | ||
|
||
/* | ||
|