@@ -309,6 +309,7 @@ def test_sandbox_activities_client_does_not_expose_worker_registration_rpc() ->
309309def test_sandbox_worker_does_not_own_legacy_wakeup_server (monkeypatch ) -> None :
310310 monkeypatch .setenv ("DTS_ENDPOINT" , "http://localhost:8080" )
311311 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
312+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
312313 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
313314
314315 worker = SandboxWorker ()
@@ -359,6 +360,7 @@ def OtherActivity(_ctx, value):
359360def test_sandbox_worker_stop_keeps_handle_for_still_running_registration_thread (monkeypatch ) -> None :
360361 monkeypatch .setenv ("DTS_ENDPOINT" , "http://localhost:8080" )
361362 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
363+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
362364 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
363365
364366 class StillRunningThread :
@@ -385,6 +387,7 @@ def is_alive(self):
385387def test_sandbox_worker_uses_scheduler_channel_without_credential (monkeypatch ) -> None :
386388 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
387389 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
390+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
388391 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
389392
390393 worker = SandboxWorker ()
@@ -396,6 +399,7 @@ def test_sandbox_worker_uses_scheduler_channel_without_credential(monkeypatch) -
396399def test_sandbox_worker_ignores_legacy_max_activities (monkeypatch ) -> None :
397400 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
398401 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
402+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
399403 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
400404 monkeypatch .delenv ("DTS_SANDBOX_MAX_ACTIVITIES" , raising = False )
401405 monkeypatch .setenv ("DTS_" + "SERVER" + "LESS_MAX_ACTIVITIES" , "7" )
@@ -408,6 +412,7 @@ def test_sandbox_worker_ignores_legacy_max_activities(monkeypatch) -> None:
408412def test_sandbox_worker_tracks_active_activity_count_with_hooks (monkeypatch ) -> None :
409413 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
410414 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
415+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
411416 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
412417
413418 worker = SandboxWorker ()
@@ -425,6 +430,7 @@ def test_sandbox_worker_tracks_active_activity_count_with_hooks(monkeypatch) ->
425430def test_sandbox_worker_uses_managed_identity_credential_when_injected (monkeypatch ) -> None :
426431 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
427432 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
433+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
428434 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
429435 monkeypatch .setenv ("DTS_AUTHENTICATION" , "ManagedIdentity" )
430436 monkeypatch .setenv ("DTS_UMI_CLIENT_ID" , "worker-client-id" )
@@ -440,6 +446,7 @@ def test_sandbox_worker_uses_managed_identity_credential_when_injected(monkeypat
440446def test_sandbox_worker_requires_managed_identity_client_id_when_auth_enabled (monkeypatch ) -> None :
441447 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
442448 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
449+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
443450 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
444451 monkeypatch .setenv ("DTS_AUTHENTICATION" , "ManagedIdentity" )
445452 monkeypatch .delenv ("DTS_UMI_CLIENT_ID" , raising = False )
@@ -455,6 +462,7 @@ def test_sandbox_worker_requires_managed_identity_client_id_when_auth_enabled(mo
455462def test_sandbox_worker_requires_registered_activities (monkeypatch ) -> None :
456463 monkeypatch .setenv ("DTS_ENDPOINT" , "http://localhost:8080" )
457464 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
465+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
458466 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "Sandbox" )
459467
460468 worker = SandboxWorker ()
@@ -470,6 +478,7 @@ def test_sandbox_worker_requires_registered_activities(monkeypatch) -> None:
470478def test_sandbox_worker_requires_injected_sandbox_provider (monkeypatch ) -> None :
471479 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
472480 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
481+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
473482 monkeypatch .delenv ("DTS_SANDBOX_PROVIDER" , raising = False )
474483
475484 try :
@@ -483,6 +492,7 @@ def test_sandbox_worker_requires_injected_sandbox_provider(monkeypatch) -> None:
483492def test_sandbox_worker_rejects_invalid_sandbox_provider (monkeypatch ) -> None :
484493 monkeypatch .setenv ("DTS_ENDPOINT" , "https://example.scheduler" )
485494 monkeypatch .setenv ("DTS_TASK_HUB" , "env-hub" )
495+ monkeypatch .setenv ("DTS_WORKER_PROFILE_ID" , "env-profile" )
486496 monkeypatch .setenv ("DTS_SANDBOX_PROVIDER" , "ContainerApp" )
487497
488498 try :
0 commit comments