Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
fixed minor issues due to conftest and konstraint latest version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy committed Mar 23, 2021
1 parent cbcb9c3 commit aac981f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions policy/container-image-latest/src.rego
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# @title Check a Deployment is not using the latest tag for their image
#
# @kinds apps/Deployment
package main

default is_gatekeeper = false
Expand Down Expand Up @@ -64,8 +67,6 @@ format(msg) = msg {
not is_gatekeeper
}

# @title Check a Deployment is not using the latest tag for their image
# @kinds apps/Deployment
violation[msg] {
is_deployment

Expand Down
2 changes: 1 addition & 1 deletion test/conftest-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ setup_file() {

print_info "${status}" "${output}" "${cmd}" "${tmp}"
[ "$status" -eq 1 ]
[ "${lines[1]}" = "not ok 1 - ${tmp}/list.yml - Deployment/imageuseslatesttag: container 'bar' is using the latest tag for its image (quay.io/redhat-cop/openshift-applier:latest), which is an anti-pattern." ]
[ "${lines[1]}" = "not ok 1 - ${tmp}/list.yml - main - Deployment/imageuseslatesttag: container 'bar' is using the latest tag for its image (quay.io/redhat-cop/openshift-applier:latest), which is an anti-pattern." ]
[ "${lines[2]}" = "" ]
}

Expand Down

0 comments on commit aac981f

Please sign in to comment.