Skip to content

Commit

Permalink
Execution of integration tests as part of devcontainer automated tests (
Browse files Browse the repository at this point in the history
  • Loading branch information
mml5bg committed Sep 22, 2023
1 parent cbb37c6 commit 746837c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Run integration tests for k3d
run: |
cd runtime_k3d/test
pytest -s ./integration/integration_test.py
pytest -s ./integration/integration_test.py::test_scripts_run_successfully_with_down
- name: Upload log files as artifacts
if: always()
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
cd runtime_kanto/test
# the socket on the ci is different to the devcontainer
sudo ln -s /run/containerd/containerd.sock /run/docker/containerd/containerd.sock
pytest -s -x ./integration/integration_test.py
pytest -s -x ./integration/integration_test.py::test_scripts_run_successfully_with_down
- name: Upload log files as artifacts
if: always()
Expand Down
4 changes: 4 additions & 0 deletions runtime_k3d/test/integration/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ def test_scripts_run_successfully():
assert check_image_if_created(image_reg)
assert run_command(f"{BASE_COMMAND_DEPLOYMENT} deploy-vehicleapp")
assert check_pods(pods_regs)


def test_scripts_run_successfully_with_down():
test_scripts_run_successfully()
assert run_command(f"{BASE_COMMAND_RUNTIME} down")
4 changes: 4 additions & 0 deletions runtime_kanto/test/integration/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,8 @@ def test_scripts_run_successfully():
f"{BASE_COMMAND_DEPLOYMENT} deploy-vehicleapp", regex_deploy
)
assert check_container_is_running("sampleapp")


def test_scripts_run_successfully_with_down():
test_scripts_run_successfully()
assert run_command_until_logs_match(f"{BASE_COMMAND_RUNTIME} down", regex_stop)
2 changes: 1 addition & 1 deletion runtime_local/test/integration/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def run_command_until_logs_match(command: str, regex_service: Pattern[str]) -> b
return True


def test_runtime_up_successfully():
def test_scripts_run_successfully():
create_dummy_vspec_file()
assert run_command_until_logs_match(f"{command} up", regex_runtime_up)

Expand Down

0 comments on commit 746837c

Please sign in to comment.