test: Add 8 and update 14 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 22s
Build-Test-Publish / build (linux/arm64) (push) Failing after 32s
Build-Test-Publish / create-manifest (push) Has been skipped

This commit is contained in:
Your Name
2025-08-10 21:18:40 +12:00
parent 1fed086348
commit 8ab6028597
22 changed files with 1392 additions and 81 deletions

View File

@@ -22,11 +22,24 @@ echo "Original hash: $ORIGINAL_HASH"
HOST=$(echo "$CONFIG" | jq -r '.host')
PORT=$(echo "$CONFIG" | jq -r '.port')
# 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"
# Use plaintext tokens from environment (set by generate_test_config.sh or manually)
# The config file should only contain hashed tokens
if [ -n "${TEST_TOKEN1:-}" ] && [ -n "${TEST_TOKEN2:-}" ] && [ -n "${TEST_TOKEN3:-}" ]; then
# Use environment tokens (plaintext)
TOKENS=("$TEST_TOKEN1" "$TEST_TOKEN2" "$TEST_TOKEN3")
TOKEN_COUNT=${#TOKENS[@]}
RANDOM_INDEX=$((RANDOM % TOKEN_COUNT))
WRITE_TOKEN="${TOKENS[$RANDOM_INDEX]}"
echo "Using plaintext token index $RANDOM_INDEX from environment"
else
# For static test configs, use hardcoded plaintext tokens
# These correspond to the hashes in the static sos_config.json
TOKENS=("t570H7DmK2VBfCwUmtFaUXyzVklL90E1" "U3x9V39Y7rjXdRK0oxZsCz5lD6jFFDtm" "UhtchhGDEGXlJ37GumimFtPe0imjAvak")
TOKEN_COUNT=${#TOKENS[@]}
RANDOM_INDEX=$((RANDOM % TOKEN_COUNT))
WRITE_TOKEN="${TOKENS[$RANDOM_INDEX]}"
echo "Using hardcoded plaintext token index $RANDOM_INDEX (for static config)"
fi
# Upload the file
echo "Uploading file..."