-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Make emitRecord take Documents instead of sql resultsets. * Make both from and until optional again. * Make the adhoc tests at least possibly reusable. Co-authored-by: Jannis Mohlin Tsiroyannis <[email protected]>
- Loading branch information
1 parent
45ce1e0
commit d2f41f3
Showing
5 changed files
with
289 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/bin/bash | ||
|
||
start=$(date --utc -d "today" +%Y-%m-%dT07:%M:00Z) | ||
|
||
echo "?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=auth&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=auth&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=auth&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=bib:S&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=bib:S&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=bib:S&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=hold:S&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=hold:S&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=hold:S&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
# DIFFING A LITTLE, BECAUSE PROD ATM ONLY FOLLOWS LINKS IN ONE STEP | ||
echo "?verb=ListRecords&set=bib:Li&from=$start&metadataPrefix=marcxml_includehold_expanded" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=bib:Li&from=$start&metadataPrefix=marcxml_includehold_expanded" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=bib:Li&from=$start&metadataPrefix=marcxml_includehold_expanded" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is expected:" | ||
diff oldcode newcode | ||
|
||
# DIFFING A LITTLE, BECAUSE PROD ATM ONLY FOLLOWS LINKS IN ONE STEP | ||
echo "?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld_expanded" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld_expanded" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=hold&from=$start&metadataPrefix=jsonld_expanded" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is expected:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=GetRecord&identifier=https://libris.kb.se/6h4rcxkn4fqlm9h5&metadataPrefix=marcxml" | ||
curl -s "localhost:8080/oaipmh/?verb=GetRecord&identifier=https://libris.kb.se/6h4rcxkn4fqlm9h5&metadataPrefix=marcxml" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=GetRecord&identifier=https://libris.kb.se/6h4rcxkn4fqlm9h5&metadataPrefix=marcxml" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&set=bib&from=$start&until=2020-01-11T11:00:00Z&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&until=2020-01-11T11:00:00Z&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&set=bib&from=$start&until=2020-01-11T11:00:00Z&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode | ||
|
||
echo "?verb=ListRecords&from=$start&metadataPrefix=jsonld" | ||
curl -s "localhost:8080/oaipmh/?verb=ListRecords&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > newcode & | ||
curl -s "export-prod.libris.kb.se:8080/oaipmh/?verb=ListRecords&from=$start&metadataPrefix=jsonld" | xmllint --format - | wc -l > oldcode & | ||
wait | ||
echo "Diff is:" | ||
diff oldcode newcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.