scripts/tests: fix missing multinode binary
Change-Id: I288d06c9eaa814ddca1e4aaacd86c5277aba86cc
This commit is contained in:
parent
f2812d76cd
commit
b426248936
@ -121,6 +121,10 @@ install_sim(){
|
||||
go mod init gatewaybuild && GOBIN=${bin_dir} GO111MODULE=on go get storj.io/gateway@main
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ -d "${work_dir}/cmd/multinode" ]; then
|
||||
go build -race -v -o ${bin_dir}/multinode storj.io/storj/cmd/multinode >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_stage(){
|
||||
@ -137,6 +141,8 @@ setup_stage(){
|
||||
|
||||
PATH=$src_sat_version_dir/bin:$PATH src_sat_cfg_dir=$(storj-sim network env --config-dir=${src_sat_version_dir}/local-network/ SATELLITE_0_DIR)
|
||||
PATH=$test_dir/bin:$PATH dest_sat_cfg_dir=$(storj-sim network env --config-dir=${test_dir}/local-network/ SATELLITE_0_DIR)
|
||||
PATH=$src_sat_version_dir/bin:$PATH src_mnd_cfg_dir=$(storj-sim network env --config-dir=${src_sat_version_dir}/local-network/ MULTINODE_0_DIR)
|
||||
PATH=$src_sat_version_dir/bin:$PATH dst_mnd_cfg_dir=$(storj-sim network env --config-dir=${test_dir}/local-network/ MULTINODE_0_DIR)
|
||||
|
||||
# if stage 2, move old satellite binary to old_satellite
|
||||
if [[ $stage == "2" ]]
|
||||
@ -144,8 +150,15 @@ setup_stage(){
|
||||
mv $dest_sat_cfg_dir/satellite $dest_sat_cfg_dir/old_satellite
|
||||
fi
|
||||
|
||||
# if using multinode, copy its configuration if none to be backwards compatible
|
||||
if [[ "$src_mnd_cfg_dir" != "" && ! -f "$dst_mnd_cfg_dir/config.yaml" ]]; then
|
||||
cp -r $src_mnd_cfg_dir/. $dst_mnd_cfg_dir
|
||||
# use most recent multinode version to avoid failure when UI was not build
|
||||
ln -f $src_sat_version_dir/bin/multinode $test_dir/bin/multinode
|
||||
fi
|
||||
|
||||
# ln binary and copy config.yaml for desired version
|
||||
ln -f $(version_dir ${sat_version})/bin/storj-sim $test_dir/bin/storj-sim
|
||||
ln -f $src_sat_version_dir/bin/storj-sim $test_dir/bin/storj-sim
|
||||
ln -f $src_sat_version_dir/bin/satellite $dest_sat_cfg_dir/satellite
|
||||
cp $src_sat_cfg_dir/config.yaml $dest_sat_cfg_dir
|
||||
replace_in_file "${src_sat_version_dir}" "${test_dir}" "${dest_sat_cfg_dir}/config.yaml"
|
||||
|
@ -96,6 +96,12 @@ install_sim(){
|
||||
(cd ${work_dir}/build/gateway-tmp && go mod init gatewaybuild && GOBIN=${bin_dir} GO111MODULE=on go get storj.io/gateway@main;)
|
||||
rm -rf ${work_dir}/build/gateway-tmp
|
||||
fi
|
||||
if [ -d "${work_dir}/cmd/multinode" ]; then
|
||||
# as storj-sim is most likely installed from $PWD and contains storj-sim version which requires multinode
|
||||
# install the most recent multinode version from $PWD
|
||||
# multinode versions that are below c08ca361d83b252da8ba466896f23fdc6dddc1d9 throws on run if UI was not build
|
||||
go build -race -v -o ${bin_dir}/multinode storj.io/storj/cmd/multinode >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
setup_stage(){
|
||||
|
Loading…
Reference in New Issue
Block a user