Skip to content

Commit b10155f

Browse files
committed
More use of base64 to improve test stability.
1 parent 9188de2 commit b10155f

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

lib/galaxy_test/api/test_tools.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,9 +3013,8 @@ def test_run_deferred_dataset_cached(self, history_id):
30133013

30143014
@skip_without_tool("metadata_bam")
30153015
def test_run_deferred_dataset_with_metadata_options_filter(self, history_id):
3016-
details = self.dataset_populator.create_deferred_hda(
3017-
history_id, "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/1.bam", ext="bam"
3018-
)
3016+
url_1 = self.dataset_populator.base64_url_for_test_file("1.bam")
3017+
details = self.dataset_populator.create_deferred_hda(history_id, url_1, ext="bam")
30193018
inputs = {"input_bam": dataset_to_param(details), "ref_names": "chrM"}
30203019
run_response = self.dataset_populator.run_tool(tool_id="metadata_bam", inputs=inputs, history_id=history_id)
30213020
output = run_response["outputs"][0]
@@ -3028,9 +3027,8 @@ def test_run_deferred_dataset_with_metadata_options_filter(self, history_id):
30283027

30293028
@skip_without_tool("pileup")
30303029
def test_metadata_validator_on_deferred_input(self, history_id):
3031-
deferred_bam_details = self.dataset_populator.create_deferred_hda(
3032-
history_id, "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/1.bam", ext="bam"
3033-
)
3030+
url_1 = self.dataset_populator.base64_url_for_test_file("1.bam")
3031+
deferred_bam_details = self.dataset_populator.create_deferred_hda(history_id, url_1, ext="bam")
30343032
fasta1_contents = open(self.get_filename("1.fasta")).read()
30353033
fasta = self.dataset_populator.new_dataset(history_id, content=fasta1_contents)
30363034
inputs = {"input1": dataset_to_param(deferred_bam_details), "reference": dataset_to_param(fasta)}
@@ -3058,7 +3056,7 @@ def test_metadata_validator_can_fail_on_deferred_input(self, history_id):
30583056

30593057
@skip_without_tool("gx_allow_uri_if_protocol")
30603058
def test_allow_uri_if_protocol_on_deferred_input(self, history_id):
3061-
source_uri = "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/simple_line.txt"
3059+
source_uri = self.dataset_populator.base64_url_for_test_file("simple_line.txt")
30623060
deferred_hda = self.dataset_populator.create_deferred_hda(history_id, source_uri, ext="txt")
30633061

30643062
inputs = {"input1": dataset_to_param(deferred_hda)}
@@ -3076,9 +3074,11 @@ def test_allow_uri_if_protocol_on_deferred_input(self, history_id):
30763074

30773075
@skip_without_tool("gx_allow_uri_if_protocol")
30783076
def test_allow_uri_if_protocol_on_collection_with_deferred(self, history_id):
3077+
url_1 = self.dataset_populator.base64_url_for_test_file("simple_line.txt")
3078+
url_2 = self.dataset_populator.base64_url_for_test_file("simple_line_alternative.txt")
30793079
source_uris = [
3080-
"https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/simple_line.txt",
3081-
"https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/simple_line_alternative.txt",
3080+
url_1,
3081+
url_2,
30823082
]
30833083
elements = [
30843084
{
@@ -3123,10 +3123,11 @@ def test_allow_uri_if_protocol_on_collection_with_deferred(self, history_id):
31233123

31243124
@skip_without_tool("cat1")
31253125
def test_run_deferred_mapping(self, history_id: str):
3126+
url_1 = self.dataset_populator.base64_url_for_test_file("4.bed")
31263127
elements = [
31273128
{
31283129
"src": "url",
3129-
"url": "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/4.bed",
3130+
"url": url_1,
31303131
"info": "my cool bed",
31313132
"deferred": True,
31323133
"ext": "bed",
@@ -3163,10 +3164,11 @@ def test_run_deferred_mapping(self, history_id: str):
31633164

31643165
@skip_without_tool("cat_list")
31653166
def test_run_deferred_list_multi_data_reduction(self, history_id: str):
3167+
url_1 = self.dataset_populator.base64_url_for_test_file("4.bed")
31663168
elements = [
31673169
{
31683170
"src": "url",
3169-
"url": "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/4.bed",
3171+
"url": url_1,
31703172
"info": "my cool bed",
31713173
"deferred": True,
31723174
"ext": "bed",

0 commit comments

Comments
 (0)