Skip to content

Commit 7932215

Browse files
authored
Run Notebook test in specified regions (aws-controllers-k8s#214)
* test script * add list * add else statment * formatting * add deletion markers for pipeline * add comment and update marker * remove flakey region * use args
1 parent d81e600 commit 7932215

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

test/canary/scripts/run_test.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ function cleanup {
4848
kubectl delete modelpackagegroups --all
4949
kubectl delete notebookinstances --all
5050
kubectl delete notebookinstancelifecycleconfig --all
51+
kubectl delete pipelineexecutions --all
52+
kubectl delete pipelines --all
5153

5254
print_controller_logs
5355

@@ -85,5 +87,12 @@ pushd $E2E_DIR
8587

8688
# run tests
8789
echo "Run Tests"
88-
pytest -n 15 --dist loadfile --log-cli-level INFO -m canary
90+
pytest_args=( -n 15 --dist loadfile --log-cli-level INFO )
91+
if [[ $SERVICE_REGION =~ ^(eu-north-1|eu-west-3)$ ]]; then
92+
# If select_regions_1 true we run the notebook_instance test
93+
pytest_args+=(-m "canary or select_regions_1")
94+
else
95+
pytest_args+=(-m "canary")
96+
pytest "${pytest_args[@]}"
97+
fi
8998
popd

test/e2e/tests/test_notebook_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def get_notebook_instance_resource_status(reference: k8s.CustomResourceReference
8686
return resource["status"]["notebookInstanceStatus"]
8787

8888
@flaky(max_runs=2, min_passes=1)
89-
@pytest.mark.canary
89+
@pytest.mark.select_regions_1
9090
@service_marker
9191
class TestNotebookInstance:
9292
def _wait_resource_notebook_status(

0 commit comments

Comments
 (0)