-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no change but add logic and tests for indexing dataset versions #3795
- Loading branch information
Showing
5 changed files
with
153 additions
and
0 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,10 @@ | ||
#!/bin/bash | ||
# We assume you've done everything in scripts/search/tests/highlighting | ||
# and you have an unreleased dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/datasets/17/versions/1?key=pete') scripts/search/tests/expected/dataset-versioning01raw | ||
# nick can see the dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true&key=nick') scripts/search/tests/expected/highlighting-nick-trees | ||
# anon can't see the dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true') scripts/search/tests/expected/dataset-versioning01anon | ||
# here's the solr doc for the dataset | ||
diff <(curl -s 'http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=id:dataset_17') scripts/search/tests/expected/dataset-versioning01dataset_17solr |
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,10 @@ | ||
#!/bin/bash | ||
# We assume you've done everything in scripts/search/tests/dataset-versioning01 | ||
# | ||
# We assume you just released your dataset for the first time. | ||
# raw version | ||
diff <(curl -s 'http://localhost:8080/api/datasets/17/versions/1?key=pete') scripts/search/tests/expected/dataset-versioning02raw | ||
# anon can now see the dataset and file | ||
diff -u <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true') scripts/search/tests/expected/dataset-versioning02anon | ||
# here's the solr doc for the dataset | ||
diff -u scripts/search/tests/expected/dataset-versioning02dataset_17solr <(curl -s 'http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=id:dataset_17') | egrep -v '_version_|release_or_create_date_dt' |
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,16 @@ | ||
#!/bin/bash | ||
# We assume you've done everything in scripts/search/tests/dataset-versioning02 | ||
# where you released version 1.0. Now you'll edit the dataset so that it enters | ||
# draft mode by changing | ||
# Title: Rings of Trees and Other Observations | ||
# to | ||
# Title: Rings of Conifers and Other Observations | ||
# | ||
# anon should be able to see the published 1.0 version but not the new draft (no change from dataset-versioning02anon) | ||
#diff -u <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true') scripts/search/tests/expected/dataset-versioning02anon | ||
# pete should be able to see the published version 1.0 with published=true (same as anon) | ||
#diff -u <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true&published=true') scripts/search/tests/expected/dataset-versioning02anon | ||
# pete should be able to see the newer draft version with published=false | ||
diff -u <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true&published=false') scripts/search/tests/expected/dataset-versioning03pete | ||
# here's the solr doc for the dataset | ||
#diff -u scripts/search/tests/expected/dataset-versioning02dataset_17solr <(curl -s 'http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=id:dataset_17') | egrep -v '_version_|release_or_create_date_dt' |
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
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