Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

test: fix Azure Stack E2E cluster provisioner #3874

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/e2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ func (ccc *CustomCloudConfig) SetEnvironment() error {
azsSelfSignedCaPath := "/aks-engine/Certificates.pem"
if _, err = os.Stat(azsSelfSignedCaPath); err == nil {
// latest dev_image has an azure-cli version that requires python3
devImagePython := "python3"
cert_command := fmt.Sprintf(`VER=$(python3 -V | grep -o [0-9].[0-9]*. | grep -o [0-9].[0-9]*);
CA=/usr/local/lib/python${VER}/dist-packages/certifi/cacert.pem;
if [ -f ${CA} ]; then cat %s >> ${CA}; fi;`, azsSelfSignedCaPath)
// include cacert.pem from python2.7 path for upgrade scenario
if _, err := os.Stat("/usr/local/lib/python2.7/dist-packages/certifi/cacert.pem"); err == nil {
devImagePython = "python"
cert_command = fmt.Sprintf(`CA=/usr/local/lib/python2.7/dist-packages/certifi/cacert.pem;
if [ -f ${CA} ]; then cat %s >> ${CA}; fi;`, azsSelfSignedCaPath)
}

cmd := exec.Command("/bin/bash", "-c",
fmt.Sprintf(`VER=$(%s -V | grep -o [0-9].[0-9]*. | grep -o [0-9].[0-9]*);
CA=/usr/local/lib/python${VER}/dist-packages/certifi/cacert.pem;
if [ -f ${CA} ]; then cat %s >> ${CA}; fi;`, devImagePython, azsSelfSignedCaPath))
cmd := exec.Command("/bin/bash", "-c", cert_command)

if out, err := cmd.CombinedOutput(); err != nil {
log.Printf("output:%s\n", out)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
log.Printf("Image: %s", ds.Spec.Template.TemplateSpec.Containers[0].Image)
log.Printf("OrchestratorVersion: %s", eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion)
version := eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion
Expect(strings.HasSuffix(ds.Spec.Template.TemplateSpec.Containers[0].Image, version)).To(Equal(true))
Expect(strings.Contains(ds.Spec.Template.TemplateSpec.Containers[0].Image, version)).To(Equal(true))
} else {
Skip("Skipping as testing custom kube-proxy image")
}
Expand Down