Skip to content
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
13 changes: 10 additions & 3 deletions test/canary/scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,20 @@ pushd $E2E_DIR
# run tests
echo "Run Tests"
pytest_args=( -n 15 --dist loadfile --log-cli-level INFO --junitxml ../canary/integration_tests.xml)
declare pytest_marks
if [[ $SERVICE_REGION =~ ^(eu-north-1|eu-west-3)$ ]]; then
# If select_regions_1 true we run the notebook_instance test
pytest_args+=(-m "canary or select_regions_1")
pytest_marks="canary or select_regions_1"
elif [[ $SHALLOW_REGION = "shallow" ]]; then
pytest_args+=(-m "shallow_canary")
pytest_marks="shallow_canary"
else
pytest_args+=(-m "canary")
pytest_marks="canary"
fi
if [[ $SERVICE_REGION =~ ^(eu-north-1|ap-south-1|ap-southeast-3|us-east-2|me-central-1|eu-west-1|eu-central-1|sa-east-1|us-east-1|ap-northeast-2|eu-west-2|ap-northeast-1|us-west-2|ap-southeast-1|ap-southeast-2|ca-central-1)$ ]]; then
# Above is the list of supported regions for Inference Component and if the current region is
# included in this we will add the inference_component mark.
pytest_marks+=" or inference_component"
fi
pytest_args+=(-m "$pytest_marks")
pytest "${pytest_args[@]}"
popd
1 change: 1 addition & 0 deletions test/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def pytest_configure(config):
config.addinivalue_line("markers", "slow: mark test as slow to run")
config.addinivalue_line("markers", "select_regions_1: mark test to only run if in select region")
config.addinivalue_line("markers", "shallow_canary: mark test to run in shallow canary tests")
config.addinivalue_line("markers", "inference_component: mark test to run inference component tests in select regions")


def pytest_collection_modifyitems(config, items):
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/tests/test_inference_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ def faulty_model(name_suffix, xgboost_model):


@service_marker
@pytest.mark.shallow_canary
@pytest.mark.canary
@pytest.mark.inference_component
class TestInferenceComponent:
def create_inference_component_test(self, inference_component):
(reference, resource, _) = inference_component
Expand Down