]> git.apps.os.sepia.ceph.com Git - s3-tests.git/commitdiff
rgw|BN: fix test to expect authorization failure wip-alimasa-sns-cross-tenant 616/head
authorAli Masarwa <ali.saed.masarwa@gmail.com>
Wed, 5 Feb 2025 08:49:01 +0000 (10:49 +0200)
committerAli Masarwa <ali.saed.masarwa@gmail.com>
Wed, 5 Feb 2025 09:04:53 +0000 (11:04 +0200)
Signed-off-by: Ali Masarwa <ali.saed.masarwa@gmail.com>
s3tests_boto3/functional/test_sns.py

index 360f14ebc517a397c9d9c0d7a1908f15d6e251dc..589343b135a19d0b70cb3adfb441613874b89e36 100644 (file)
@@ -85,14 +85,16 @@ def test_cross_account_topic(sns, sns_alt):
     name = get_new_topic_name()
     arn = sns.create_topic(Name=name)['TopicArn']
 
-    # not visible to any alt user apis
-    with pytest.raises(sns.exceptions.NotFoundException):
+    # not authorized to any alt user apis
+    with pytest.raises(sns.exceptions.AuthorizationErrorException):
         sns_alt.get_topic_attributes(TopicArn=arn)
-    with pytest.raises(sns.exceptions.NotFoundException):
+    with pytest.raises(sns.exceptions.AuthorizationErrorException):
         sns_alt.set_topic_attributes(TopicArn=arn, AttributeName='Policy', AttributeValue='')
+    with pytest.raises(sns.exceptions.AuthorizationErrorException):
+        sns_alt.delete_topic(TopicArn=arn)
 
     # delete returns success
-    sns_alt.delete_topic(TopicArn=arn)
+    sns.delete_topic(TopicArn=arn)
 
     response = sns_alt.list_topics()
     assert arn not in [p['TopicArn'] for p in response['Topics']]