282c37a5f6db8b7704e1d0f3617f55f38b8aea70 hiram Fri Apr 19 15:27:08 2019 -0700 more error testing for illegal inputs refs #18869 diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile index 7de8bd4..46d7c6c 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -1,21 +1,21 @@ test:: test0 test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 \ test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 \ test21 test22 test23 test24 test25 test26 test27 test28 test29 test30 \ test31 test32 test33 test34 test35 test36 test37 test38 test39 test40 \ - test41 test42 + test41 test42 test42 test43 test45 setOutput: @if [ ! -d testOutput ]; then mkdir testOutput; fi clean:: rm -f testOutput/*.gz rmdir testOutput # exclude these lines from the JSON output for comparison with expected excludeLines = downloadTime|dataTime # testing /list/noSubCommand, /list/publicHubs and /list/ucscGenomes test0: setOutput @./jsonConsumer.pl -test0 2>&1 | sed -e 's#https://.*/list#/list#;' | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz @@ -239,15 +239,37 @@ test40: setOutput @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/track" -db="ce4" -track="gold" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /getData/track?db=ce11&track=gc5BaseBw - bigWig data output # plus jsonArrayOutput test41: setOutput @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/track" -db="ce11" -track="gc5BaseBw" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /getData/track?db=ce6&track=gc5Base - wiggle database table # plus jsonArrayOutput test42: setOutput @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/track" -db="ce6" -track="gc5Base" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz + +# testing /getData/sequence?db=cxe6 - error test illegal database name +# plus jsonArrayOutput +test43: setOutput + @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/sequence" -db="cxe6" 2>&1 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + @echo '### test43 ./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/sequence" -db="cxe6"' + +# testing /list/tracks?db=cxe6 - error test illegal database name +# plus jsonArrayOutput +test44: setOutput + @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/list/tracks" -db="cxe6" 2>&1 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + @echo '### test44 ./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/list/tracks" -db="cxe6"' + +# testing /getData/track?db=cxe6&track=gc5Base - error test illegal database +# plus jsonArrayOutput +test45: setOutput + @./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/track" -db="cxe6" 2>&1 -track="gc5Base" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + @echo '### test45 ./jsonConsumer.pl -jsonOutputArrays -maxItemsOutput=123 -endpoint="/getData/track" -db="cxe6" 2>&1 -track="gc5Base"' +