diff --git a/rego/allow_rollout_restart/policy_test.rego b/rego/allow_rollout_restart/policy_test.rego index 5d919c108bff5d03f9c252354aaf5d56e286c563..97ca3c93e166ead85da011cddc59b1970645f790 100644 --- a/rego/allow_rollout_restart/policy_test.rego +++ b/rego/allow_rollout_restart/policy_test.rego @@ -67,8 +67,37 @@ review_deployment_patch_extra_annotations(annotationname,annotationvalue,usernam out = { "review": { "userInfo": { - "username": username + "username": username, + "groups": [ groupname ] + }, + "operation": "UPDATE", + "kind": { + "kind": "Deployment" + }, + "object": { + "spec": { + "template": { + "metadata": { + "annotations": { + "dreaded_gazebo": "indeed", + annotationname: annotationvalue + } + } + } + } + }, + "oldObject": { + "spec": { + "template:" { + "metadata": { + "annotations": { + "kubectl.kubernetes.io/restartedAt": previousrestarted + } + } + } + } } } } } +