7c28bed1b8d3dd630b67d92a4a784eab1d56c0ea
hiram
  Thu Sep 5 16:34:12 2019 -0700
also check end coordinate vs chromSize for hub genome 2bit sequence getData refs #24089

diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile
index 0a2dcc4..5727567 100644
--- src/hg/hubApi/tests/makefile
+++ src/hg/hubApi/tests/makefile
@@ -1,48 +1,48 @@
 
 test:: all
 
 all:: test0 listFunctions getFunctions listSchema getSequence wigData \
 	supportedTypes errorTests notSupported bugReports
 
 listFunctions: list01 list02 list03 list04 list05 list06 list07 list08 list09 \
 	list10 list11 list12 list13 list14 list15
 
-getFunctions: test6 test7 test8 test9 test10 test11 test12 test13 test14 \
+getFunctions: test8 test9 test10 test11 test12 test13 test14 \
 	test15 test16 test19 test21 test26 test27 test28 \
 	test29 test39 test40
 
 listSchema: schema01 schema02 schema03 schema04 schema05 schema06 schema07
 
-getSequence: getSeq01 getSeq02 getSeq03
+getSequence: getSeq01 getSeq02 getSeq03 getSeq04 getSeq05
 
 wigData: wig01 wig02 wig03 wig04 wig05 wig06 wig07 wig08 wig09 wig10 \
 	wig11 wig12 wig13 wig14 wig15 wig16 wig17 wig18 wig19 wig20 \
 	wig21 wig22 wig23 wig24
 
 supportedTypes: altGraphX barChart chain ctgPos expRatio factorSource gvf \
 	interact netAlign peptideMapping pgSnp
 
 errorTests: err01 err02 err03 err04 err05 err06 err07 err08 err09 err10 \
 	err11 err12 err13 err14 err15 err16 err17 err18 err19 err20 \
 	err21 err22 err23 err24 err25 err26 err27 err28 err29 err30 \
 	err31 err32 err33 err34 err35 err36 err37 err38 err39
 
 notSupported: notSup01 notSup02 notSup03 notSup04 notSup05 notSup06 \
 	notSup07 notSup08 notSup09 notSup10
 
-bugReports: redmine23733
+bugReports: redmine23733 redmine24089a redmine24089b
 
 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
@@ -131,40 +131,30 @@
 
 # testing /list/chromosomes?genome=ce11&track=est different chrom name column
 list14: setOutput
 	@printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=est;genome=ce11'\n"
 	@./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce11" -track="est" 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=est different chrom name column
 # and ce4 has split tables
 list15: setOutput
 	@printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/list/chromosomes?track=est;genome=ce4'\n"
 	@./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="ce4" -track="est" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 ##########################   getData functions  #############################
-# testing /getData/sequence?genome=ce11&chrom=chrM
-test6: setOutput
-	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome="ce11" -chrom="chrM" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
-	@zdiff expected/$@.gz testOutput/$@.gz
-
-# testing /getData/sequence?genome=ce11&chrom=chrM&start=1&end=128
-test7: setOutput
-	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome="ce11" -chrom="chrM" -start=1 -end=128 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
-	@zdiff expected/$@.gz testOutput/$@.gz
-
 # testing /getData/track?genome=ce11&track=gold
 test8: setOutput
 	@./jsonConsumer.pl -maxItemsOutput=123 -endpoint="/getData/track" -genome="ce11" -track="gold" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/track?genome=ce11&track=gold&chrom=chrM
 test9: setOutput
 	@./jsonConsumer.pl -endpoint="/getData/track" -genome="ce11" -track="gold" -chrom="chrM" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/track?genome=ce11&track=gold&chrom=chrI&start=1&end=1024
 test10: setOutput
 	@./jsonConsumer.pl -endpoint="/getData/track" -genome="ce11" -track="gold" -chrom="chrI" -start=1 -end=1024 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
@@ -255,30 +245,40 @@
 	@./jsonConsumer.pl -endpoint="/getData/sequence" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -chrom="chrCp" -start=4321 -end=5678 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/sequence? hubUrl Bejerano genome=hg19&chrom=chrM&start=4321&end=5647
 getSeq02: setOutput
 	@printf "### $@ "
 	@./jsonConsumer.pl -endpoint="/getData/sequence" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/GillBejerano/hub.txt" -genome="hg19" -chrom="chrM" -start=4321 -end=5678 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/sequence? genome=monDom5&chrom=chr1&start=4321&end=5647
 getSeq03: setOutput
 	@printf "### $@ "
 	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome="monDom5" -chrom="chr1" -start=748055061 -end=748055161 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
+# testing /getData/sequence?genome=ce11&chrom=chrM
+getSeq04: setOutput
+	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome="ce11" -chrom="chrM" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
+# testing /getData/sequence?genome=ce11&chrom=chrM&start=1&end=128
+getSeq05: setOutput
+	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome="ce11" -chrom="chrM" -start=1 -end=128 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
 ###############################################################################
 #  /list/schema testing
 ###############################################################################
 # testing /list/schema? genome=monDom5&track=gold
 schema01: setOutput
 	@printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/schema?track=gold;genome=monDom5'\n"
 	@./jsonConsumer.pl -endpoint="/list/schema" -genome="monDom5" -track=gold | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /list/schema? genome=hg19&track=ctgPos
 schema02: setOutput
 	@printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/schema?track=ctgPos;genome=hg19'\n"
 	@./jsonConsumer.pl -endpoint="/list/schema" -genome="hg19" -track=ctgPos | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
@@ -868,30 +868,42 @@
 #     34 bam - not supported</li>
 #      2 bigBarChart - not supported</li>
 #      3 bigInteract - not supported</li>
 #     18 bigMaf - not supported</li>
 #    152 composite container - not supported</li>
 #     93 composite view - not supported</li>
 #     37 halSnake - not supported</li>
 #     31 superTrack child - not supported</li>
 #      5 vcfTabix - not supported</li>
 
 redmine23733: setOutput
 	@printf "### $@ 'https://api-test.gi.ucsc.edu/getData/track?track=knownGene;genome=hg38;chrom=chr1;end=48000;start=47000'\n"
 	@./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=knownGene -chrom=chr1 -start=47000 -end=48000 2>&1 | sed -e 's/, /,\n/g;' | egrep -v "${excludeLines}" | tail -5 | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
+# end coordinate for get sequence past end of chromosome, database genome
+redmine24089a: setOutput
+	@printf "### $@ 'https://api-test.gi.ucsc.edu/getData/sequence?genome=hg19;chrom=chrM;start=16560;end=16572'\n"
+	@./jsonConsumer.pl -endpoint="/getData/sequence" -genome=hg19 -chrom=chrM -start=16560 -end=16572 2>&1 | sed -e 's/, /,\n/g;' | egrep -v "${excludeLines}" | tail -5 | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
+# end coordinate for get sequence past end of chromosome, asmHub genome
+redmine24089b: setOutput
+	@printf "### $@ 'https://api-test.gi.ucsc.edu/getData/sequence?genome=araTha1;chrom=chrCp;start=154470;end=154479;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt'\n"
+	@./jsonConsumer.pl -endpoint="/getData/sequence" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -chrom="chrCp" -start=154470 -end=154479 2>&1 | sed -e 's/, /,\n/g;' | egrep -v "${excludeLines}" | tail -5 | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
 # track types found in hg19 and hg38 trackDb 'type' column:
 #   4586 narrowPeak
 #   4472 bigWig
 #   3294 bed
 #   1745 broadPeak
 #    872 chain
 #    871 netAlign
 #    596 bam
 #    512 genePred
 #    438 bigBed
 #    368 pgSnp
 #    348 bedGraph
 #    286 wig
 #    106 psl
 #     46