Skip to content

Commit

Permalink
e2e: Ensure CI artifact template is registered for AWS provider
Browse files Browse the repository at this point in the history
Signed-off-by: Naadir Jeewa <[email protected]>
  • Loading branch information
Naadir Jeewa committed Oct 12, 2020
1 parent b71d280 commit 7a2eb53
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var _ = Describe("conformance tests", func() {
Measure(specName, func(b Benchmarker) {

name := fmt.Sprintf("cluster-%s", util.RandomString(6))
setEnvVar("USE_CI_ARTIFACTS", "true", false)
kubernetesVersion := e2eConfig.GetVariable(KubernetesVersion)
flavor := clusterctl.DefaultFlavor
if useCIArtifacts {
Expand Down Expand Up @@ -105,6 +106,7 @@ var _ = Describe("conformance tests", func() {
}, 1)

AfterEach(func() {
setEnvVar("USE_CI_ARTIFACTS", "false", false)
// Dumps all the resources in the spec namespace, then cleanups the cluster object and the spec namespace itself.
dumpSpecResourcesAndCleanup(ctx, "", bootstrapClusterProxy, artifactFolder, namespace, e2eConfig.GetIntervals, skipCleanup)
})
Expand Down
13 changes: 12 additions & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,24 @@ var _ = SynchronizedBeforeSuite(func() []byte {
Expect(err).NotTo(HaveOccurred())
platformKustomization, err := ioutil.ReadFile("data/ci-artifacts-platform-kustomization.yaml")
Expect(err).NotTo(HaveOccurred())
_, err = kubernetesversions.GenerateCIArtifactsInjectedTemplateForDebian(
ciTemplate, err := kubernetesversions.GenerateCIArtifactsInjectedTemplateForDebian(
kubernetesversions.GenerateCIArtifactsInjectedTemplateForDebianInput{
ArtifactsDirectory: artifactFolder,
SourceTemplate: sourceTemplate,
PlatformKustomization: platformKustomization,
},
)
clusterctlCITemplate := clusterctl.Files{
SourcePath: ciTemplate,
TargetName: "cluster-template-conformance-ci-artifacts.yaml",
}
providers := e2eConfig.Providers
for i, prov := range providers {
if prov.Name != "aws" {
continue
}
e2eConfig.Providers[i].Files = append(e2eConfig.Providers[i].Files, clusterctlCITemplate)
}
Expect(err).NotTo(HaveOccurred())
awsSession = newAWSSession()
createCloudFormationStack(awsSession, getBootstrapTemplate())
Expand Down

0 comments on commit 7a2eb53

Please sign in to comment.