-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathadhoc_cmptest.sh
executable file
·82 lines (70 loc) · 4.67 KB
/
adhoc_cmptest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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