Skip to content

Commit 97051e2

Browse files
Fix workflow diff test fixture
Co-authored-by: platinummonkey <cody.lee@datadoghq.com>
1 parent b4d812e commit 97051e2

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/commands/workflows.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ mod tests {
311311
"id": "wf-123",
312312
"type": "workflows",
313313
"attributes": {
314+
"action_id": "wf-123",
314315
"name": "Old workflow",
315316
"description": "Deploy service",
316317
"spec": {"steps": [{"name": "deploy", "timeout": 60}]},

src/util_ext.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ pub struct DiffEntry {
191191
pub const READONLY_WORKFLOW_FIELDS: &[&str] = &[
192192
"data.id",
193193
"data.type",
194+
"data.attributes.action_id",
195+
"data.attributes.actionId",
194196
"data.attributes.created_at",
195197
"data.attributes.createdAt",
196198
"data.attributes.created_by",
@@ -958,6 +960,7 @@ mod tests {
958960
"id": "wf-1",
959961
"type": "workflows",
960962
"attributes": {
963+
"action_id": "wf-1",
961964
"name": "Deploy",
962965
"updatedAt": "2024-01-02T00:00:00Z"
963966
}
@@ -966,6 +969,7 @@ mod tests {
966969
normalize_for_diff(&mut v, READONLY_WORKFLOW_FIELDS);
967970
assert!(v.pointer("/data/id").is_none());
968971
assert!(v.pointer("/data/type").is_none());
972+
assert!(v.pointer("/data/attributes/action_id").is_none());
969973
assert!(v.pointer("/data/attributes/updatedAt").is_none());
970974
assert_eq!(
971975
v.pointer("/data/attributes/name"),

0 commit comments

Comments
 (0)