Skip to content

Commit dd88338

Browse files
gavin-aguiarGavin Aguiar
andauthored
docker test fix (#1184)
* Docker tests fixes * Updated dedicated github workflow * Updated consumption workflow * Reverted change to docker tests * Removed setup webhost from consumption docker tests * Removing the index url from the workflows --------- Co-authored-by: Gavin Aguiar <gavin@GavinPC>
1 parent df5d5b5 commit dd88338

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

.github/workflows/ci_consumption_workflow.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run all tests in tests/consumption_tests in Docker using a consumption image
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: CI Consumption tests
4+
name: CI Consumption E2E tests
55

66
on:
77
workflow_dispatch:
@@ -28,10 +28,7 @@ jobs:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install dependencies
3030
run: |
31-
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
32-
python setup.py build
33-
python setup.py webhost --branch-name=dev
34-
python setup.py extension
31+
python -m pip install -U -e .[dev]
3532
- name: Running 3.7 Tests
3633
if: matrix.python-version == 3.7
3734
env:

.github/workflows/ci_docker_con_workflow.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ jobs:
2929
python-version: ${{ matrix.python-version }}
3030
- name: Install dependencies
3131
run: |
32-
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
33-
python setup.py build
34-
python setup.py webhost --branch-name=dev
35-
python setup.py extension
32+
python -m pip install -U -e .[dev]
3633
- name: Running 3.7 Tests
3734
if: matrix.python-version == 3.7
3835
env:

.github/workflows/ci_docker_ded_workflow.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ jobs:
3030
python-version: ${{ matrix.python-version }}
3131
- name: Install dependencies
3232
run: |
33-
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
34-
python setup.py build
35-
python setup.py webhost --branch-name=dev
36-
python setup.py extension
33+
python -m pip install -U -e .[dev]
3734
- name: Running 3.7 Tests
3835
if: matrix.python-version == 3.7
3936
env:

tests/utils/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
PYAZURE_WEBHOST_DEBUG = "PYAZURE_WEBHOST_DEBUG"
1717

1818
# CI test constants
19-
CONSUMPTION_DOCKER_TEST = "false"
20-
DEDICATED_DOCKER_TEST = "false"
19+
CONSUMPTION_DOCKER_TEST = "CONSUMPTION_DOCKER_TEST"
20+
DEDICATED_DOCKER_TEST = "DEDICATED_DOCKER_TEST"

tests/utils/testutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ def setUpClass(cls):
219219
else:
220220
cls.host_stdout = tempfile.NamedTemporaryFile('w+t')
221221

222-
_setup_func_app(TESTS_ROOT / script_dir)
223222
try:
224223
if is_envvar_true(CONSUMPTION_DOCKER_TEST):
225224
cls.webhost = WebHostConsumption(script_dir).spawn_container()
226225
elif is_envvar_true(DEDICATED_DOCKER_TEST):
227226
cls.webhost = WebHostDedicated(script_dir).spawn_container()
228227
else:
228+
_setup_func_app(TESTS_ROOT / script_dir)
229229
cls.webhost = start_webhost(script_dir=script_dir,
230230
stdout=cls.host_stdout)
231231
except Exception:

0 commit comments

Comments
 (0)