scripts: fix test-sim-backwards

Change-Id: I9d6644d4b493f5f6f60a960cacfaac2b5b828a5f
This commit is contained in:
Egon Elbre 2020-04-01 21:00:45 +03:00 committed by Michal Niewrzal
parent ffe7a3c211
commit 90319dbec1
3 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -ueo pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
: "${STORJ_NETWORK_DIR?Environment variable STORJ_NETWORK_DIR needs to be set}"
BUCKET=bucket-123
@ -22,6 +24,9 @@ setup(){
echo "setup test successfully"
}
# override configured access with access where address is node ID + satellite addess
export STORJ_ACCESS=$(go run "$SCRIPTDIR"/update-access.go $SATELLITE_0_DIR $GATEWAY_0_ACCESS)
if [[ "$1" == "upload" ]]; then
setup

View File

@ -25,9 +25,16 @@ echo "Checking out latest release tag: $latestReleaseTag"
git worktree add -f "$RELEASE_DIR" "$latestReleaseCommit"
# delete this file that forces production config settings
rm -f "$RELEASE_DIR/private/version/release.go"
rm -f "$RELEASE_DIR/internal/version/release.go"
# clear out release information
cat > $RELEASE_DIR/private/version/release.go <<EOF
// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
package version
EOF
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# replace unstable git.apache.org package with github
@ -93,9 +100,6 @@ sed -i -e "s#storage.whitelisted-satellites#storage2.trust.sources#g" `storj-sim
sed -i -e "s#storage.whitelisted-satellites#storage2.trust.sources#g" `storj-sim network env STORAGENODE_8_DIR`/config.yaml
sed -i -e "s#storage.whitelisted-satellites#storage2.trust.sources#g" `storj-sim network env STORAGENODE_9_DIR`/config.yaml
# override configured access with access where address is node ID + satellite addess
export STORJ_ACCESS=$(go run "$SCRIPTDIR"/update-access.go `storj-sim network env SATELLITE_0_DIR` `storj-sim network env GATEWAY_0_ACCESS`)
# run download part of backward compatibility tests from the current branch, using new uplink
PATH=$BRANCH_DIR/bin:$PATH storj-sim -x --host $STORJ_NETWORK_HOST4 network test bash "$SCRIPTDIR"/test-backwards.sh download

View File

@ -56,7 +56,7 @@ uplink cp "$SRC_DIR/diff-size-segments" "sj://$BUCKET/" --progress=fal
cat "$SRC_DIR/put-file" | uplink put "sj://$BUCKET/put-file"
uplink --config-dir "$UPLINK_DIR" import named-access $GATEWAY_0_ACCESS
uplink --config-dir "$UPLINK_DIR" import named-access $STORJ_ACCESS
FILES=$(STORJ_ACCESS= uplink --config-dir "$UPLINK_DIR" --access named-access ls "sj://$BUCKET" | tee $TMPDIR/list | wc -l)
EXPECTED_FILES="5"
if [ "$FILES" == $EXPECTED_FILES ]