Skip to content

Commit

Permalink
test: validate error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Jan 20, 2025
1 parent daa0f42 commit c7888a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_s3tables/test_s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ def test_delete_table_deletes_underlying_table_storage():
s3.head_bucket(Bucket=bucket_name)

client.delete_table(tableBucketARN=arn, namespace="bar", name="baz")
with pytest.raises(s3.exceptions.ClientError):
with pytest.raises(s3.exceptions.ClientError) as exc:
s3.head_bucket(Bucket=bucket_name)
exc.match("Not Found")


@mock_aws
Expand All @@ -246,10 +247,11 @@ def test_delete_table_fails_on_version_token_mismatch():
)
token = resp["versionToken"]

with pytest.raises(client.exceptions.ConflictException):
with pytest.raises(client.exceptions.ConflictException) as exc:
client.delete_table(
tableBucketARN=arn, namespace="bar", name="baz", versionToken=f"{token}-foo"
)
exc.match("Provided version token does not match the table version token.")


@mock_aws
Expand Down

0 comments on commit c7888a1

Please sign in to comment.