Page MenuHomeSoftware Heritage

relay-credentials-test.sh
No OneTemporary

relay-credentials-test.sh

#!/usr/bin/env bash
source "$(dirname $0)/_test_setup.sh"
cfg="../relay/config.yml"
creds="../relay/credentials.json"
# Relay files don't exist in a clean clone.
test ! -f $cfg
test ! -f $creds
# Running the install script adds them.
source relay-credentials.sh
test -f $cfg
test -f $creds
test "$(jq -r 'keys[2]' $creds)" = "secret_key"
# If the files exist we don't touch it.
echo GARBAGE > $cfg
echo MOAR GARBAGE > $creds
source relay-credentials.sh
test "$(cat $cfg)" = "GARBAGE"
test "$(cat $creds)" = "MOAR GARBAGE"
report_success

File Metadata

Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 12:07 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3249678

Event Timeline