test: add missing test for delete_log_stream (#4788)

This commit is contained in:
Felipe Alvarez 2022-01-25 23:03:57 +10:00 committed by GitHub
parent 9a5d5b5d25
commit 5e9c238fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -660,6 +660,18 @@ def test_put_retention_policy():
response = conn.delete_log_group(logGroupName=log_group_name)
@mock_logs
def test_delete_log_stream():
logs = boto3.client("logs", TEST_REGION)
logs.create_log_group(logGroupName="logGroup")
logs.create_log_stream(logGroupName="logGroup", logStreamName="logStream")
resp = logs.describe_log_streams(logGroupName="logGroup")
assert resp["logStreams"][0]["logStreamName"] == "logStream"
logs.delete_log_stream(logGroupName="logGroup", logStreamName="logStream")
resp = logs.describe_log_streams(logGroupName="logGroup")
assert resp["logStreams"] == []
@mock_logs
def test_delete_retention_policy():
conn = boto3.client("logs", TEST_REGION)