Skip to content

Commit 4eb8165

Browse files
committed
ACLP Logs - Stabilize integration tests - loosen status update assertions
1 parent 6385d29 commit 4eb8165

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

linode_api4/objects/monitor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ class LogsStreamStatus(StrEnum):
757757
active = "active"
758758
inactive = "inactive"
759759
provisioning = "provisioning"
760+
deactivating = "deactivating"
760761

761762

762763
class LogsStreamType(StrEnum):

test/integration/models/monitor/test_monitor_logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,19 +420,19 @@ def test_update_stream_label_and_status(
420420

421421
new_label = original_label + "-upd"
422422
new_status = (
423-
LogsStreamStatus.inactive
423+
[LogsStreamStatus.inactive, LogsStreamStatus.deactivating]
424424
if original_status == LogsStreamStatus.active
425-
else LogsStreamStatus.active
425+
else [LogsStreamStatus.active, LogsStreamStatus.provisioning]
426426
)
427427

428428
stream.label = new_label
429-
stream.status = new_status
429+
stream.status = new_status[0]
430430
result = stream.save()
431431
assert result is True
432432

433433
updated = test_linode_client.load(LogsStream, provisioned_stream.id)
434434
assert updated.label == new_label
435-
assert updated.status == new_status
435+
assert updated.status in new_status
436436

437437
history = updated.history
438438
snapshot_original = next(h for h in history if h.version == version_before)

0 commit comments

Comments
 (0)