File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 85
85
EOF
86
86
}
87
87
88
+ # download_vendor_archive downloads vendor tarball for v1 projects. It skips the
89
+ # download if tarball exists.
90
+ function download_vendor_archive {
91
+ archive_name=" vendor.v1.tgz"
92
+ archive_download_url=" https://storage.googleapis.com/kubebuilder-vendor/$archive_name "
93
+ archive_path=" $tmp_root /$archive_name "
94
+ if [ ! -f $archive_path ]; then
95
+ header_text " downloading vendor archive $archive_path "
96
+ curl -sL ${archive_download_url} -o " $archive_path "
97
+ fi
98
+ }
99
+
88
100
function test_project {
89
101
project_dir=$1
90
102
version=$2
91
103
header_text " performing tests in dir $project_dir for project version v$version "
92
- vendor_tarball=$( pwd ) /testdata /vendor.v$version .tgz
104
+ vendor_tarball=$tmp_root /vendor.v$version .tgz
93
105
old_gopath=$GOPATH
94
106
if [[ $version == " 1" ]]; then
95
107
export GOPATH=$( pwd) /testdata/gopath
108
+ download_vendor_archive
96
109
fi
97
110
cd testdata/$project_dir
98
111
# v2 uses modules, and thus doesn't have a vendor directory
You can’t perform that action at this time.
0 commit comments