test: fixes for akse e2e tests (#3874)
This commit is contained in:
Родитель
98c36cc757
Коммит
f13990be5c
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче