Skip to content

Commit

Permalink
fix: skip test_kubeflow_workloads when test_create_profile fails (#…
Browse files Browse the repository at this point in the history
…122)

* use pytest-dependency plugin
  • Loading branch information
NohaIhab authored Sep 18, 2024
1 parent 14f4199 commit 7735118
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions driver/test_kubeflow_workloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def create_poddefaults_on_proxy(request, lightkube_client):
lightkube_client.delete(PODDEFAULT_RESOURCE, name=poddefault_name, namespace=NAMESPACE)


@pytest.mark.abort_on_fail
@pytest.mark.dependency()
async def test_create_profile(lightkube_client, create_profile):
"""Test Profile creation.
Expand Down Expand Up @@ -174,8 +174,13 @@ async def test_create_profile(lightkube_client, create_profile):
log.info(f"PodDefaults in {NAMESPACE} namespace are {created_poddefaults_names}.")


@pytest.mark.dependency(depends=["test_create_profile"])
def test_kubeflow_workloads(
lightkube_client, pytest_cmd, tests_checked_out_commit, request, create_poddefaults_on_proxy
lightkube_client,
pytest_cmd,
tests_checked_out_commit,
request,
create_poddefaults_on_proxy,
):
"""Run a K8s Job to execute the notebook tests."""
log.info(f"Starting Kubernetes Job {NAMESPACE}/{JOB_NAME} to run notebook tests...")
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ juju<4.0
lightkube
pytest
pytest-operator
pytest-dependency
tenacity
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ pytest==7.4.3
# via
# -r requirements.in
# pytest-asyncio
# pytest-dependency
# pytest-operator
pytest-asyncio==0.21.1
# via pytest-operator
pytest-dependency==0.6.0
# via -r requirements.in
pytest-operator==0.31.0
# via -r requirements.in
python-dateutil==2.8.2
Expand Down Expand Up @@ -198,3 +201,6 @@ websocket-client==1.6.4
# via kubernetes
websockets==8.1
# via juju

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit 7735118

Please sign in to comment.