Skip to content

Commit 6c1a019

Browse files
committed
Fix for consumption tests
1 parent 79e7b03 commit 6c1a019

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/consumption_tests/test_linux_consumption.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from unittest import TestCase, skipIf
77

88
from requests import Request
9-
from tests.utils.testutils_lc import LinuxConsumptionWebHostController
109

1110
from azure_functions_worker.constants import (
1211
PYTHON_ENABLE_DEBUG_LOGGING,
1312
PYTHON_ENABLE_INIT_INDEXING,
1413
PYTHON_ENABLE_WORKER_EXTENSIONS,
1514
PYTHON_ISOLATE_WORKER_DEPENDENCIES,
1615
)
16+
from tests.utils.testutils_lc import LinuxConsumptionWebHostController
1717

1818
_DEFAULT_HOST_VERSION = "4"
1919

@@ -61,6 +61,7 @@ def test_http_no_auth(self):
6161
"AzureWebJobsStorage": self._storage,
6262
"SCM_RUN_FROM_PACKAGE": self._get_blob_url("HttpNoAuth")
6363
})
64+
6465
req = Request('GET', f'{ctrl.url}/api/HttpTrigger')
6566
resp = ctrl.send_request(req)
6667
self.assertEqual(resp.status_code, 200)
@@ -377,7 +378,8 @@ def generate_random_bytes_stream():
377378
streamed_data, b'streamingtestingresponseisreturned')
378379

379380
def _get_blob_url(self, scenario_name: str) -> str:
381+
sas_token = os.getenv(f"SAS_TOKEN{self._py_shortform}")
380382
return (
381383
f'https://pythonworker{self._py_shortform}sa.blob.core.windows.net/'
382-
f'python-worker-lc-apps/{scenario_name}{self._py_shortform}.zip'
384+
f'python-worker-lc-apps/{scenario_name}{self._py_shortform}.zip?{sas_token}'
383385
)

0 commit comments

Comments
 (0)