File tree 2 files changed +10
-3
lines changed
tests/unit/sagemaker/jumpstart
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ def get_jumpstart_content_bucket(region: str) -> str:
66
66
constants .ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE in os .environ
67
67
and len (os .environ [constants .ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE ]) > 0
68
68
):
69
- return os .environ [constants .ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE ]
69
+ bucket_override = os .environ [constants .ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE ]
70
+ LOGGER .info ("Using JumpStart bucket override: '%s'" , bucket_override )
71
+ return bucket_override
70
72
try :
71
73
return constants .JUMPSTART_REGION_NAME_TO_LAUNCHED_REGION_DICT [region ].content_bucket
72
74
except KeyError :
Original file line number Diff line number Diff line change @@ -44,8 +44,13 @@ def test_get_jumpstart_content_bucket():
44
44
45
45
def test_get_jumpstart_content_bucket_override ():
46
46
with patch .dict (os .environ , {ENV_VARIABLE_JUMPSTART_CONTENT_BUCKET_OVERRIDE : "some-val" }):
47
- random_region = "random_region"
48
- assert "some-val" == utils .get_jumpstart_content_bucket (random_region )
47
+ with patch ("logging.Logger.info" ) as mocked_info_log :
48
+ random_region = "random_region"
49
+ assert "some-val" == utils .get_jumpstart_content_bucket (random_region )
50
+ mocked_info_log .assert_called_once_with (
51
+ "Using JumpStart bucket override: '%s'" ,
52
+ "some-val" ,
53
+ )
49
54
50
55
51
56
def test_get_jumpstart_launched_regions_message ():
You can’t perform that action at this time.
0 commit comments