2121 WebRuntimeBinding ,
2222)
2323from deploy .legacy_development_compatibility import ECR_REPOSITORY_URI
24+ from test_support .safety import authorize_from_environment
2425
2526SOURCE_SHA = "a" * 40
2627IMAGE_DIGEST = f"sha256:{ 'b' * 64 } "
@@ -317,6 +318,9 @@ def collect_subprocess(
317318 "VERSION" : VERSION ,
318319 "IMAGE_DIGEST" : IMAGE_DIGEST ,
319320 "RELEASE_SHA" : SOURCE_SHA ,
321+ "DTC_TEST_SAFETY_COMMAND" : "remote_readonly" ,
322+ "DTC_TEST_TARGET_CLASS" : "isolated_development" ,
323+ "DTC_TEST_REMOTE_NAMESPACE" : "deploy-12345678-1" ,
320324 }
321325 with (
322326 patch .dict ("os.environ" , workflow_environment , clear = True ),
@@ -336,6 +340,13 @@ def collect_subprocess(
336340 self .assertEqual (environment ["DTC_EXPECTED_VERSION" ], VERSION )
337341 self .assertEqual (environment ["DTC_EXPECTED_SOURCE_SHA" ], SOURCE_SHA )
338342 self .assertEqual (environment ["DTC_EXPECTED_IMAGE_DIGEST" ], IMAGE_DIGEST )
343+ self .assertEqual (environment ["DTC_TEST_SAFETY_COMMAND" ], "remote_readonly" )
344+ self .assertEqual (environment ["DTC_TEST_TARGET_CLASS" ], "isolated_development" )
345+ self .assertEqual (environment ["DTC_TEST_REMOTE_NAMESPACE" ], "deploy-12345678-1" )
346+ self .assertEqual (environment ["DTC_TEST_BASE_URL" ], "https://web.dtcdev.click" )
347+ with patch .dict ("os.environ" , environment , clear = True ):
348+ authorization = authorize_from_environment ("remote_readonly" )
349+ self .assertEqual (authorization .base_url , "https://web.dtcdev.click" )
339350
340351 def test_eventual_visibility_freezes_two_samples_around_public_health (self ) -> None :
341352 events : list [str ] = []
0 commit comments