Skip to content

Commit 0919c64

Browse files
authored
Merge pull request #86 from Ouranosinc/fix-runtest-to-not-change-pavics-to-boreas-breaking-some-diffs
Fix runtest to properly exclude regex replace pavics.ouranos.ca string Current implementation to change `pavics.ouranos.ca` to `boreas.ouranos.ca` was bit silly, done in a haste. It causes diff problem when the url is printed back. Relate to PR Ouranosinc/pavics-sdi#225 ``` _ pavics-sdi-fix-subset-user-input.ipynb-for-jenkins/docs/source/notebooks/subset-user-input.ipynb::Cell 12 _ Notebook cell execution failed Cell 12: Cell outputs differ Input: # gather data from pavics' data catalogue catalog = "https://boreas.ouranos.ca/twitcher/ows/proxy/thredds/catalog/datasets/gridded_obs/catalog.xml" # TEST_USE_PROD_DATA cat = TDSCatalog(catalog) data = cat.datasets[0].access_urls["OPENDAP"] data Traceback: mismatch 'text/plain' assert reference_output == test_output failed: "'https://pav...rcan_v2.ncml'" == "'https://bor...rcan_v2.ncml'" Skipping 72 identical trailing characters in diff, use -v to show - 'https://boreas.ouranos ? ^^^^ + 'https://pavics.ouranos ? ^ +++ ``` Jenkins build from CRIM https://daccs-jenkins.crim.ca/job/PAVICS-e2e-workflow-tests/job/fix-runtest-to-not-change-pavics-to-boreas-breaking-some-diffs/2/console Jenkins build from Ouranos against our staging server http://jenkins.ouranos.ca/job/PAVICS-e2e-workflow-tests/job/fix-runtest-to-not-change-pavics-to-boreas-breaking-some-diffs/7/console
2 parents b411898 + be097b1 commit 0919c64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: runtest

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ fi
1616

1717
if [ ! -z "$PAVICS_HOST" ]; then
1818
echo "Will run notebooks against $PAVICS_HOST"
19-
# Any lines marked with TEST_USE_PROD_DATA will replace pavics to boreas to
20-
# use data from prod and avoid having to replicate data to test servers.
21-
sed -i "/TEST_USE_PROD_DATA/s/pavics.ouranos.ca/boreas.ouranos.ca/g" $NOTEBOOKS
22-
# .ncml links will always comes from the production server, not the server
19+
# * .ncml links will always comes from the production server, not the server
2320
# under test since we do not perform regex replace for .ncml links.
24-
sed -i "/\.ncml/!s/pavics.ouranos.ca/$PAVICS_HOST/g" $NOTEBOOKS
21+
#
22+
# * Any lines marked with TEST_USE_PROD_DATA will also use data from prod
23+
# and avoid having to replicate data to test servers.
24+
sed -i "/\(\.ncml\|TEST_USE_PROD_DATA\)/!s/pavics.ouranos.ca/$PAVICS_HOST/g" $NOTEBOOKS
2525
git diff # not working for notebooks from other repos
2626
fi
2727

0 commit comments

Comments
 (0)