gitleaks: fix test

Gitleaks <2.1.0 reported 0 leaks found for an empty repo. It now
returns an error and reports that the repo is empty. This commit updates
the brew test to match the new gitleaks behaviour.

Related: conjurinc/ops#246

Closes #42747.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
This commit is contained in:
Hugh Saunders 2019-08-02 21:28:49 +01:00 committed by Chongyu Zhu
parent 7ddb4b61a2
commit 31bd3535eb
No known key found for this signature in database
GPG key ID: 1A43E3C9100B38F5

View file

@ -27,6 +27,6 @@ class Gitleaks < Formula
end
test do
assert_includes shell_output("#{bin}/gitleaks -r https://github.com/gitleakstest/emptyrepo.git"), "0 leaks detected"
assert_includes shell_output("#{bin}/gitleaks -r https://github.com/gitleakstest/emptyrepo.git", 2), "remote repository is empty"
end
end