test: Add 3 and update 5 files
This commit is contained in:
@@ -22,8 +22,11 @@ echo "Original hash: $ORIGINAL_HASH"
|
||||
HOST=$(echo "$CONFIG" | jq -r '.host')
|
||||
PORT=$(echo "$CONFIG" | jq -r '.port')
|
||||
|
||||
# extract the first write token from the config
|
||||
WRITE_TOKEN=$(echo "$CONFIG" | jq -r '.write_tokens[0]')
|
||||
# randomly select one of the available write tokens from the config
|
||||
TOKEN_COUNT=$(echo "$CONFIG" | jq -r '.write_tokens | length')
|
||||
RANDOM_INDEX=$((RANDOM % TOKEN_COUNT))
|
||||
WRITE_TOKEN=$(echo "$CONFIG" | jq -r ".write_tokens[$RANDOM_INDEX]")
|
||||
echo "Using token index $RANDOM_INDEX out of $TOKEN_COUNT available tokens"
|
||||
|
||||
# Upload the file
|
||||
echo "Uploading file..."
|
||||
|
Reference in New Issue
Block a user