diff options
-rw-r--r-- | tests/fixtures/README.md | 4 | ||||
-rwxr-xr-x | tests/fixtures/verify-entity-download.sh | 5 | ||||
-rw-r--r-- | tests/fixtures/verify.csv | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tests/fixtures/README.md b/tests/fixtures/README.md index 0418526..26609d2 100644 --- a/tests/fixtures/README.md +++ b/tests/fixtures/README.md @@ -5,10 +5,10 @@ code or in a TSV file (for general editing). ## verify.csv -This file contains four columns: match status, reason, and two identifiers. +This file contains four columns: two identifiers, a match status and an optional reason. ```tsv -Status.STRONG OK.SLUG_TITLE_AUTHOR_MATCH 7kzrmoajzzedxgdvbltgqihszu bd4crw4p7ber7pzhpoyw2c77bi +7kzrmoajzzedxgdvbltgqihszu,bd4crw4p7ber7pzhpoyw2c77bi,Status.STRONG,OK.SLUG_TITLE_AUTHOR_MATCH, ``` diff --git a/tests/fixtures/verify-entity-download.sh b/tests/fixtures/verify-entity-download.sh index 5f68ba2..79b2f94 100755 --- a/tests/fixtures/verify-entity-download.sh +++ b/tests/fixtures/verify-entity-download.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Fetches release entities references in VERIFY. +# Fetches release entity references and caches them locally. set -e -u set -o pipefail @@ -8,8 +8,9 @@ set -o pipefail API="https://api.fatcat.wiki/v0" CSV="verify.csv" -for ident in $(awk '{print $3"\n"$4}' "$CSV"); do +for ident in $(awk -F, '{print $1"\n"$2}' "$CSV"); do if [ -f "$ident" ]; then + >&2 echo "[cached] $ident" continue fi curl -sL --fail "$API/release/$ident" | jq --sort-keys . >"$ident" diff --git a/tests/fixtures/verify.csv b/tests/fixtures/verify.csv index 344ac02..844bd12 100644 --- a/tests/fixtures/verify.csv +++ b/tests/fixtures/verify.csv @@ -1 +1 @@ -Status.STRONG,OK.SLUG_TITLE_AUTHOR_MATCH,7kzrmoajzzedxgdvbltgqihszu,bd4crw4p7ber7pzhpoyw2c77bi +7kzrmoajzzedxgdvbltgqihszu,bd4crw4p7ber7pzhpoyw2c77bi,Status.STRONG,OK.SLUG_TITLE_AUTHOR_MATCH, |