Skip to content

Commit

Permalink
chore: replace endpoint in Mooncake
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelHu committed Feb 26, 2025
1 parent 875c0b0 commit 5711765
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vhdbuilder/packer/test/linux-vhd-content-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ testPackagesInstalled() {
echo $test "[INFO] File ${downloadedPackage} exists and has the correct size ${fileSizeDownloaded} bytes"
# Validate whether package exists in Azure China cloud
if [[ $downloadURL == https://acs-mirror.azureedge.net/* ]]; then
mcURL="${downloadURL/https:\/\/acs-mirror.azureedge.net/https:\/\/kubernetesartifacts.blob.core.chinacloudapi.cn}"
mcURL="${downloadURL/https:\/\/acs-mirror.azureedge.net/https:\/\/mirror.azk8s.cn}"
echo "Validating: $mcURL"
isExist=$(curl -sLI "$mcURL" | grep -i "404 The specified blob does not exist." | awk '{print $2}')
if [[ "$isExist" == "404" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion vhdbuilder/packer/test/windows-files-check.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function Test-CompareSingleDir {
}

if ($URL.StartsWith("https://acs-mirror.azureedge.net/")) {
$mcURL = $URL.replace("https://acs-mirror.azureedge.net/", "https://kubernetesartifacts.blob.core.chinacloudapi.cn/")
$mcURL = $URL.replace("https://acs-mirror.azureedge.net/", "https://mirror.azk8s.cn/")

$mooncakeFileSize = (Invoke-WebRequest $mcURL -UseBasicParsing -Method Head).Headers.'Content-Length'

Expand Down
2 changes: 1 addition & 1 deletion vhdbuilder/packer/test/windows-vhd-content-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function Test-FilesToCacheOnVHD

if ( $URL.StartsWith("https://acs-mirror.azureedge.net/"))
{
$mcURL = $URL.replace("https://acs-mirror.azureedge.net/", "https://kubernetesartifacts.blob.core.chinacloudapi.cn/")
$mcURL = $URL.replace("https://acs-mirror.azureedge.net/", "https://mirror.azk8s.cn/")
try
{
# It's too slow to download the file from the China Cloud. So we only compare the file size.
Expand Down

0 comments on commit 5711765

Please sign in to comment.