github.com/csi-driver/blobfuse-csi-driver@v0.5.0/test/sanity/run-tests-all-clouds.sh (about) 1 #!/bin/bash 2 3 # Copyright 2019 The Kubernetes Authors. 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 set -eo pipefail 18 19 function install_csi_sanity_bin { 20 mkdir -p $GOPATH/src/github.com/kubernetes-csi/csi-test 21 git clone https://github.com/kubernetes-csi/csi-test.git -b v2.2.0 $GOPATH/src/github.com/kubernetes-csi/csi-test 22 pushd $GOPATH/src/github.com/kubernetes-csi/csi-test/cmd/csi-sanity 23 make && make install 24 popd 25 } 26 27 function cleanup { 28 echo 'pkill -f blobfuseplugin' 29 pkill -f blobfuseplugin 30 echo 'Deleting CSI sanity test binary' 31 rm -rf $GOPATH/src/github.com/kubernetes-csi 32 } 33 34 trap cleanup EXIT 35 36 # copy blobfuse binary 37 mkdir -p /usr/blob 38 cp test/artifacts/blobfuse /usr/bin/blobfuse 39 40 install_csi_sanity_bin 41 apt update && apt install libfuse2 -y 42 test/sanity/run-test.sh "$nodeid"