Skip to content

Commit b31f02a

Browse files
committed
fix(test): Add missing acknowledge_risk param to LF integ tests
1 parent 1fce913 commit b31f02a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sagemaker-mlops/tests/integ/test_feature_store_lakeformation.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def test_create_feature_group_with_lake_formation_fails_without_offline_store(ro
287287
"""
288288
fg_name = generate_feature_group_name()
289289

290-
lake_formation_config = LakeFormationConfig(disable_hybrid_access_mode=True)
290+
lake_formation_config = LakeFormationConfig(disable_hybrid_access_mode=True, acknowledge_risk=True)
291291
lake_formation_config.enabled = True
292292

293293
# Attempt to create without offline store but with Lake Formation enabled
@@ -317,7 +317,7 @@ def test_create_feature_group_with_lake_formation_fails_without_role(s3_uri, reg
317317
fg_name = generate_feature_group_name()
318318

319319
offline_store_config = OfflineStoreConfig(s3_storage_config=S3StorageConfig(s3_uri=s3_uri))
320-
lake_formation_config = LakeFormationConfig(disable_hybrid_access_mode=True)
320+
lake_formation_config = LakeFormationConfig(disable_hybrid_access_mode=True, acknowledge_risk=True)
321321
lake_formation_config.enabled = True
322322

323323
# Attempt to create without role_arn but with Lake Formation enabled
@@ -357,7 +357,7 @@ def test_enable_lake_formation_fails_for_non_created_status(s3_uri, role, region
357357
# Immediately try to enable Lake Formation without waiting for Created status
358358
# The Feature Group will be in 'Creating' status
359359
with pytest.raises(ValueError) as exc_info:
360-
fg.enable_lake_formation(disable_hybrid_access_mode=True, wait_for_active=False)
360+
fg.enable_lake_formation(disable_hybrid_access_mode=True, acknowledge_risk=True, wait_for_active=False)
361361

362362
# Verify error message mentions status requirement
363363
error_msg = str(exc_info.value)
@@ -401,7 +401,7 @@ def test_enable_lake_formation_without_offline_store(role, region):
401401

402402
# Attempt to enable Lake Formation
403403
with pytest.raises(ValueError) as exc_info:
404-
fg.enable_lake_formation(disable_hybrid_access_mode=True)
404+
fg.enable_lake_formation(disable_hybrid_access_mode=True, acknowledge_risk=True)
405405
# Verify error message mentions offline store requirement
406406
assert "does not have an offline store configured" in str(exc_info.value)
407407

@@ -427,6 +427,7 @@ def test_enable_lake_formation_fails_with_invalid_registration_role(
427427
with pytest.raises(ValueError) as exc_info:
428428
fg.enable_lake_formation(
429429
disable_hybrid_access_mode=True,
430+
acknowledge_risk=True,
430431
use_service_linked_role=False,
431432
registration_role_arn=None,
432433
)

0 commit comments

Comments
 (0)