Skip to content

Commit e84f973

Browse files
ari-nzclaude
andcommitted
chore(tests): skip special-app tests on staging; guard import
- Remove SPECIAL_APPLICATION_ID/VERSION from staging constants entirely - Guard the import in e2e_test.py with try/except so staging doesn't NameError - Add skipif(SPECIAL_APPLICATION_ID is None) to both special-app tests so they are silently skipped on staging but still run on production (0.99.0) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent c2d0c3b commit e84f973

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

tests/aignostics/platform/e2e_test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
PIPELINE_GPU_TYPE,
3737
PIPELINE_MAX_GPUS_PER_SLIDE,
3838
PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES,
39-
SPECIAL_APPLICATION_ID,
40-
SPECIAL_APPLICATION_VERSION,
4139
SPOT_0_CRC32C,
4240
SPOT_0_GS_URL,
4341
SPOT_0_HEIGHT,
@@ -62,6 +60,12 @@
6260
TEST_APPLICATION_VERSION,
6361
)
6462

63+
try:
64+
from tests.constants_test import SPECIAL_APPLICATION_ID, SPECIAL_APPLICATION_VERSION
65+
except ImportError:
66+
SPECIAL_APPLICATION_ID = None # type: ignore[assignment]
67+
SPECIAL_APPLICATION_VERSION = None # type: ignore[assignment]
68+
6569
TEST_APPLICATION_SUBMIT_AND_WAIT_DEADLINE_SECONDS = 60 * 45 # 45 minutes
6670
TEST_APPLICATION_SUBMIT_AND_WAIT_DUE_DATE_SECONDS = 60 * 10 # 10 minutes
6771
TEST_APPLICATION_SUBMIT_AND_WAIT_TIMEOUT_SECONDS = (
@@ -610,6 +614,7 @@ def test_platform_heta_app_submit() -> None:
610614
@pytest.mark.e2e
611615
@pytest.mark.stress_only
612616
@pytest.mark.long_running
617+
@pytest.mark.skipif(SPECIAL_APPLICATION_ID is None, reason="Special application not configured for this environment")
613618
@pytest.mark.timeout(timeout=SPECIAL_APPLICATION_SUBMIT_AND_FIND_SUBMIT_TIMEOUT_SECONDS)
614619
def test_platform_special_app_submit() -> None:
615620
"""Test application runs with the special application.
@@ -678,6 +683,7 @@ def test_platform_special_app_submit() -> None:
678683
@pytest.mark.stress_only
679684
@pytest.mark.long_running
680685
@pytest.mark.scheduled_only
686+
@pytest.mark.skipif(SPECIAL_APPLICATION_ID is None, reason="Special application not configured for this environment")
681687
@pytest.mark.timeout(timeout=SPECIAL_APPLICATION_FIND_AND_VALIDATE_TIMEOUT_SECONDS)
682688
def test_platform_special_app_find_and_validate() -> None:
683689
"""Test application runs with the special application.

tests/constants_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@
108108
PIPELINE_CPU_PROVISIONING_MODE = "SPOT"
109109
PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES = 30
110110

111-
SPECIAL_APPLICATION_ID = "test-app"
112-
SPECIAL_APPLICATION_VERSION = "1.0.0"
113-
114111
SPOT_0_EXPECTED_RESULT_FILES = [
115112
("tissue_qc_segmentation_map_image.tiff", 1642856, 10),
116113
("tissue_qc_geojson_polygons.json", 259955, 10),

0 commit comments

Comments
 (0)