Skip to content

Commit

Permalink
test: fix fixtures
Browse files Browse the repository at this point in the history
Add missing fields to the unit test fixtures

Signed-off-by: Flavio Castelli <[email protected]>
  • Loading branch information
flavio committed Nov 2, 2023
1 parent 8f2119f commit d4880df
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 28 deletions.
37 changes: 23 additions & 14 deletions test_data/deployment_with_privileged_containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,29 @@
"uid": "1299d386-525b-4032-98ae-1949f69f9cfc",
"kind": {
"kind": "Deployment",
"version": "v1"
"version": "v1",
"group": "apps"
},
"resource": {
"group": "apps",
"version": "v1",
"resource": "deployments"
},
"requestKind": {
"version": "v1",
"group": "apps",
"kind": "Deployment"
},
"userInfo": {
"username": "alice",
"uid": "alice-uid",
"groups": [
"system:authenticated"
]
},
"name": "nginx",
"namespace": "default",
"operation": "CREATE",
"object": {
"metadata": {
"name": "nginx"
Expand All @@ -23,17 +44,5 @@
}
}
}
},
"operation": "CREATE",
"requestKind": {
"version": "v1",
"kind": "Deployment"
},
"userInfo": {
"username": "alice",
"uid": "alice-uid",
"groups": [
"system:authenticated"
]
}
}
}
35 changes: 21 additions & 14 deletions test_data/statefulset_with_privileged_container.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@
"uid": "1299d386-525b-4032-98ae-1949f69f9cfc",
"kind": {
"kind": "StatefulSet",
"version": "v1"
"version": "v1",
"group": "apps"
},
"resource": {
"group": "apps",
"version": "v1",
"resource": "statefulsets"
},
"operation": "CREATE",
"requestKind": {
"group": "apps",
"version": "v1",
"kind": "StatefulSet"
},
"userInfo": {
"username": "alice",
"uid": "alice-uid",
"groups": [
"system:authenticated"
]
},
"object": {
"metadata": {
Expand All @@ -23,17 +42,5 @@
}
}
}
},
"operation": "CREATE",
"requestKind": {
"version": "v1",
"kind": "StatefulSet"
},
"userInfo": {
"username": "alice",
"uid": "alice-uid",
"groups": [
"system:authenticated"
]
}
}
}

0 comments on commit d4880df

Please sign in to comment.