Skip to content

Commit 0c025d6

Browse files
authored
Merge pull request #281 from songjiaxun/fix_install_blobfuse
fix: install blobfuse binary for Azure Stack test pipeline
2 parents 427f211 + d767cde commit 0c025d6

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

test/integration/run-tests-all-clouds.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,25 @@ set -eo pipefail
1818

1919
GO111MODULE=off go get github.com/rexray/gocsi/csc
2020

21+
function install_blobfuse_bin {
22+
echo 'Installing blobfuse...'
23+
apt-get update && apt install ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev wget -y
24+
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
25+
dpkg -i packages-microsoft-prod.deb
26+
apt-get update && apt install blobfuse fuse -y
27+
rm -f packages-microsoft-prod.deb
28+
}
29+
2130
readonly resource_group="$1"
2231
readonly cloud="$2"
2332

2433
# copy blobfuse binary
25-
mkdir -p /usr/blob
26-
cp test/artifacts/blobfuse /usr/bin/blobfuse
34+
if [[ "$cloud" == "AzureStackCloud" ]]; then
35+
install_blobfuse_bin
36+
else
37+
mkdir -p /usr/blob
38+
cp test/artifacts/blobfuse /usr/bin/blobfuse
39+
fi
2740

2841
apt update && apt install libfuse2 -y
2942
test/integration/run-test.sh "tcp://127.0.0.1:10000" "/tmp/stagingtargetpath" "/tmp/targetpath" "$resource_group" "$cloud"

test/sanity/run-tests-all-clouds.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
set -eo pipefail
1818

19+
readonly cloud="$1"
20+
1921
function install_csi_sanity_bin {
2022
echo 'Installing CSI sanity test binary...'
2123
git clone https://github.com/kubernetes-csi/csi-test.git -b v2.2.0
@@ -24,9 +26,22 @@ function install_csi_sanity_bin {
2426
popd
2527
}
2628

29+
function install_blobfuse_bin {
30+
echo 'Installing blobfuse...'
31+
apt-get update && apt install ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev wget -y
32+
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
33+
dpkg -i packages-microsoft-prod.deb
34+
apt-get update && apt install blobfuse fuse -y
35+
rm -f packages-microsoft-prod.deb
36+
}
37+
2738
# copy blobfuse binary
28-
mkdir -p /usr/blob
29-
cp test/artifacts/blobfuse /usr/bin/blobfuse
39+
if [[ "$cloud" == "AzureStackCloud" ]]; then
40+
install_blobfuse_bin
41+
else
42+
mkdir -p /usr/blob
43+
cp test/artifacts/blobfuse /usr/bin/blobfuse
44+
fi
3045

3146
install_csi_sanity_bin
3247
apt update && apt install libfuse2 -y

test/sanity/sanity_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestSanity(t *testing.T) {
7171
assert.NoError(t, err)
7272
assert.True(t, strings.HasSuffix(projectRoot, "blob-csi-driver"))
7373

74-
cmd := exec.Command("./test/sanity/run-tests-all-clouds.sh")
74+
cmd := exec.Command("./test/sanity/run-tests-all-clouds.sh", creds.Cloud)
7575
cmd.Dir = projectRoot
7676
cmd.Stdout = os.Stdout
7777
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)