Skip to content

Commit

Permalink
ut fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fseldow committed Dec 9, 2024
1 parent 8ca16e7 commit 868a428
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/parts/linux/cloud-init/artifacts/cse_helpers_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,38 +174,38 @@ Describe 'cse_helpers.sh'
echo "mock logs to events calling with $1"
}
K8S_REGISTRY_REPO="oss/binaries/kubernetes"
BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER="mcr.microsoft.com"
CPU_ARCH="amd64"
It 'returns KUBE_BINARY_URL if it is already registry url'
KUBE_BINARY_URL="mcr.microsoft.com/oss/binaries/kubernetes/kubernetes-node:v1.30.0-linux-amd64"

updateKubeBinaryRegistryURL
When call updateKubeBinaryRegistryURL
The variable KUBE_BINARY_REGISTRY_URL should equal "$KUBE_BINARY_URL"
The output line 1 should equal "KUBE_BINARY_URL is a registry url, will use it to pull the kube binary"
End
It 'returns expected output from KUBE_BINARY_URL'
KUBE_BINARY_URL="https://acs-mirror.azureedge.net/kubernetes/v1.30.0-hotfix20241209/binaries/kubernetes-nodes-linux-amd64.tar.gz"
BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER="mcr.microsoft.com"
KUBERNETES_VERSION="1.30.0"
CPU_ARCH="amd64"

updateKubeBinaryRegistryURL
When call updateKubeBinaryRegistryURL
The variable KUBE_BINARY_REGISTRY_URL should equal "$BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER/oss/binaries/kubernetes/kubernetes-node:v1.30.0-hotfix20241209-linux-amd64"
The output line 1 should equal "Extracted version: v1.30.0-hotfix20241209 from KUBE_BINARY_URL: $KUBE_BINARY_URL"
End
It 'returns expected output for moonckae acs-mirror'
KUBE_BINARY_URL="https://acs-mirror.azureedge.cn/kubernetes/v1.30.0-alpha/binaries/kubernetes-nodes-linux-amd64.tar.gz"
BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER="mcr.microsoft.com"
KUBERNETES_VERSION="1.30.0"
CPU_ARCH="amd64"

updateKubeBinaryRegistryURL
When call updateKubeBinaryRegistryURL
The variable KUBE_BINARY_REGISTRY_URL should equal "$BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER/oss/binaries/kubernetes/kubernetes-node:v1.30.0-alpha-linux-amd64"
The output line 1 should equal "Extracted version: v1.30.0-alpha from KUBE_BINARY_URL: $KUBE_BINARY_URL"
End
It 'uses KUBENETES_VERSION if KUBE_BINARY_URL is invalid'
KUBE_BINARY_URL="https://invalidpath/v1.30.0-lts100/binaries/kubernetes-nodes-linux-amd64.tar.gz"
BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER="mcr.microsoft.com"
KUBERNETES_VERSION="1.30.0"
CPU_ARCH="amd64"

updateKubeBinaryRegistryURL
When call updateKubeBinaryRegistryURL
The variable KUBE_BINARY_REGISTRY_URL should equal "$BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER/oss/binaries/kubernetes/kubernetes-node:v1.30.0-linux-amd64"
Expand Down

0 comments on commit 868a428

Please sign in to comment.