async def test_monitor_raise_if_no_env_is_set(): patch_settings() os.environ[POLYAXON_KEYS_RUN_INSTANCE] = "foo" with pytest.raises(PolyaxonContainerException): await start_sidecar( container_id="foo", sleep_interval=3, sync_interval=6, monitor_outputs=True, monitor_logs=False, ) del os.environ[POLYAXON_KEYS_RUN_INSTANCE]
async def test_monitor_raise_if_no_pod_id(): patch_settings() os.environ[POLYAXON_KEYS_RUN_INSTANCE] = "owner.project.runs.{}".format( uuid.uuid4().hex) with pytest.raises(PolyaxonContainerException): await start_sidecar( container_id="foo", sleep_interval=3, sync_interval=6, monitor_outputs=True, monitor_logs=False, ) del os.environ[POLYAXON_KEYS_RUN_INSTANCE]