Skip to content

docker test fix #1184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/ci_consumption_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run all tests in tests/consumption_tests in Docker using a consumption image
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI Consumption tests
name: CI Consumption E2E tests

on:
workflow_dispatch:
Expand All @@ -28,10 +28,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
python setup.py build
python setup.py webhost --branch-name=dev
python setup.py extension
python -m pip install -U -e .[dev]
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci_docker_con_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
python setup.py build
python setup.py webhost --branch-name=dev
python setup.py extension
python -m pip install -U -e .[dev]
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci_docker_ded_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
python setup.py build
python setup.py webhost --branch-name=dev
python setup.py extension
python -m pip install -U -e .[dev]
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
PYAZURE_WEBHOST_DEBUG = "PYAZURE_WEBHOST_DEBUG"

# CI test constants
CONSUMPTION_DOCKER_TEST = "false"
DEDICATED_DOCKER_TEST = "false"
CONSUMPTION_DOCKER_TEST = "CONSUMPTION_DOCKER_TEST"
DEDICATED_DOCKER_TEST = "DEDICATED_DOCKER_TEST"
2 changes: 1 addition & 1 deletion tests/utils/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ def setUpClass(cls):
else:
cls.host_stdout = tempfile.NamedTemporaryFile('w+t')

_setup_func_app(TESTS_ROOT / script_dir)
try:
if is_envvar_true(CONSUMPTION_DOCKER_TEST):
cls.webhost = WebHostConsumption(script_dir).spawn_container()
elif is_envvar_true(DEDICATED_DOCKER_TEST):
cls.webhost = WebHostDedicated(script_dir).spawn_container()
else:
_setup_func_app(TESTS_ROOT / script_dir)
cls.webhost = start_webhost(script_dir=script_dir,
stdout=cls.host_stdout)
except Exception:
Expand Down