7fea9ff255a6436de9e6095d69553d8b5bb75778 hiram Thu Oct 10 12:58:47 2019 -0700 only compare track name listings on the /list/tracks function to avoid the confusion of changing genbank tables messing up the comparison refs #23589 diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile index cdb8bd6..c20f73a 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -54,33 +54,36 @@ ################################################### list functions ########### # testing /list/hubGenomes list01: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/hubGenomes?hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt'\n" @./jsonConsumer.pl -hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt -endpoint="/list/hubGenomes" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/tracks? hubUrl genome=araTha1 trackLeavesOnly list02: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/tracks?trackLeavesOnly=1;genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt'\n" @./jsonConsumer.pl -hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt -endpoint="/list/tracks" -genome="araTha1" -trackLeavesOnly 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/tracks?genome=ce11 trackLeavesOnly=1 +# the grep " : {" will pick out just the track names to compare, so that +# the changing genbank tables do not mess up the comparison, this will only +# be comparing the track listing list03: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/tracks?trackLeavesOnly=1;genome=ce11'\n" - @./jsonConsumer.pl -endpoint="/list/tracks" -genome="ce11" -trackLeavesOnly 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @./jsonConsumer.pl -endpoint="/list/tracks" -genome="ce11" -trackLeavesOnly 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | grep " : {" | sort | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes?genome=ce11 list04: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?genome=ce11'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce11" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes?genome=ce11&track=gold list05: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=gold;genome=ce11'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce11" -track="gold" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes? hubUrl genome=araTha1 @@ -90,33 +93,36 @@ @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes? hubUrl genome=araTha1 track=assembly list07: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=assembly;genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -track="assembly" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/tracks? hubUrl genome=araTha1 list08: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/tracks?genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt'\n" @./jsonConsumer.pl -hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt -endpoint="/list/tracks" -genome="araTha1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/tracks?genome=ce11 +# the grep " : {" will pick out just the track names to compare, so that +# the changing genbank tables do not mess up the comparison, this will only +# be comparing the track listing list09: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/tracks?genome=ce11'\n" - @./jsonConsumer.pl -endpoint="/list/tracks" -genome="ce11" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @./jsonConsumer.pl -endpoint="/list/tracks" -genome="ce11" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | grep " : {" | sort | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes?genome=ce11&track=mrna SQL table name is all_mrna list10: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=mrna;genome=ce11'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce11" -track="mrna" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /list/chromosomes?genome=ce4&track=mrna SQL table name is all_mrna # and ce4 has split tables list11: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=mrna;genome=ce4'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce4" -track="mrna" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz