Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion acceptance/cmd/workspace/alerts-v2-not-found/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
>>> [CLI] alerts-v2 trash-alert [ALERT_ID]

>>> [CLI] alerts-v2 get-alert [ALERT_ID]
DELETED
{
"lifecycle_state": "DELETED"
}

>>> [CLI] alerts-v2 trash-alert [ALERT_ID]
Error: Alert [ALERT_ID] is already trashed
Expand Down
8 changes: 6 additions & 2 deletions acceptance/cmd/workspace/alerts-v2-not-found/script
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Alert get/update/trash responses for trashed, purged and unknown alerts.
# Expected output was recorded against AWS on 2026-11-11; the test is local-only
# because the messages are backend-owned and have changed before.
# because the messages are backend-owned and have changed before. Two known
# differences on cloud, so Cloud = true would fail:
# - trash-alert on a trashed alert reports a different UUID than the alert id;
# - update-alert on a trashed alert names the file with a timestamp suffix
# (myalert-<timestamp>.dbalert.json), since trashing renames it.
create_alert() {
$CLI alerts-v2 create-alert --json '{"display_name": "'$1'", "query_text": "select 1", "warehouse_id": "w1", "evaluation": {"comparison_operator": "EQUAL", "source": {"name": "1"}, "threshold": {"value": {"double_value": 1}}}, "schedule": {"quartz_cron_schedule": "0 0 * * * ?", "timezone_id": "UTC"}}' | jq -r .id
}
Expand All @@ -10,7 +14,7 @@ add_repl "$alert_id" ALERT_ID

title "trashed alert is still readable"
trace $CLI alerts-v2 trash-alert $alert_id
trace $CLI alerts-v2 get-alert $alert_id | jq -r .lifecycle_state
trace $CLI alerts-v2 get-alert $alert_id | jq '{lifecycle_state}'
errcode trace $CLI alerts-v2 trash-alert $alert_id
errcode trace $CLI alerts-v2 update-alert $alert_id display_name --json '{"display_name": "x"}'

Expand Down
Loading