Skip to content

Commit c237ba2

Browse files
committed
Fixed docker tests
1 parent 60c7690 commit c237ba2

File tree

5 files changed

+36
-4
lines changed

5 files changed

+36
-4
lines changed

.github/workflows/ci_docker_con_workflow.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,15 @@ jobs:
8080
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
8181
run: |
8282
python -m pytest --reruns 4 -vv --instafail tests/endtoend
83+
- name: Running 3.11 Tests
84+
if: matrix.python-version == 3.11
85+
env:
86+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString311 }}
87+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString311 }}
88+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString311 }}
89+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString311 }}
90+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }}
91+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }}
92+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }}
93+
run: |
94+
python -m pytest --reruns 4 -vv --instafail tests/endtoend

.github/workflows/ci_docker_ded_workflow.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
19+
python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ]
2020
permissions: read-all
2121
env:
2222
DEDICATED_DOCKER_TEST: "true"
@@ -80,3 +80,16 @@ jobs:
8080
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
8181
run: |
8282
python -m pytest --reruns 4 -vv --instafail tests/endtoend
83+
- name: Running 3.11 Tests
84+
if: matrix.python-version == 3.11
85+
env:
86+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString311 }}
87+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString311 }}
88+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString311 }}
89+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString311 }}
90+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }}
91+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }}
92+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }}
93+
run: |
94+
python -m pytest --reruns 4 -vv --instafail tests/endtoend
95+

tests/unittests/test_dispatcher.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ async def test_dispatcher_load_azfunc_in_init(self):
673673
async def test_dispatcher_load_modules_dedicated_app(self):
674674
"""Test modules are loaded in dedicated apps
675675
"""
676-
677676
os.environ["PYTHON_ISOLATE_WORKER_DEPENDENCIES"] = "1"
678677

679678
# Dedicated Apps where placeholder mode is not set

tests/utils/testutils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,13 @@ def setUpClass(cls):
261261
WebHostDedicated(docker_configs).spawn_container()
262262
else:
263263
_setup_func_app(TESTS_ROOT / script_dir)
264-
cls.webhost = start_webhost(script_dir=script_dir,
265-
stdout=cls.host_stdout)
264+
try:
265+
cls.webhost = start_webhost(script_dir=script_dir,
266+
stdout=cls.host_stdout)
267+
except Exception as ex:
268+
error_message = f'WebHost is not started correctly. {ex} '
269+
cls.host_stdout_logger.error(error_message)
270+
266271
if not cls.webhost.is_healthy():
267272
cls.host_out = cls.host_stdout.read()
268273
if cls.host_out is not None and len(cls.host_out) > 0:

tests/utils/testutils_docker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def close(self) -> bool:
5959

6060
return exit_code == 0
6161

62+
def is_healthy(self) -> bool:
63+
pass
64+
6265

6366
class WebHostDockerContainerBase(unittest.TestCase):
6467

0 commit comments

Comments
 (0)