aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-24 00:40:17 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-24 00:40:17 +0100
commit77d9c26819ab59a183c86a4b3ec3b5b80e85dd14 (patch)
tree9851639b2b60f80d39c976f0abfec73ebb17ff84
parentabe89171b53245fbb9696da6a3a9366ff6312caf (diff)
downloadfuzzycat-77d9c26819ab59a183c86a4b3ec3b5b80e85dd14.tar.gz
fuzzycat-77d9c26819ab59a183c86a4b3ec3b5b80e85dd14.zip
verify cases: start with ids and keep reason optional
-rw-r--r--tests/fixtures/README.md4
-rwxr-xr-xtests/fixtures/verify-entity-download.sh5
-rw-r--r--tests/fixtures/verify.csv2
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,