Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert e2e to venom #72

Merged
merged 1 commit into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ references:
command_runner_image: quay.io/reactiveops/ci-images:v11-stretch
executor: golang-exec
pre_script: e2e/pre.sh
store-test-results: /tmp/test-results
script: e2e/test.sh
requires:
- test
Expand Down
4 changes: 1 addition & 3 deletions e2e/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ set -e

go build -ldflags "-s -w" -o rbac-lookup

docker cp rbac-lookup e2e-command-runner:/rbac-lookup

docker cp e2e/deploy e2e-command-runner:/
docker cp ./ e2e-command-runner:/rbac-lookup
17 changes: 15 additions & 2 deletions e2e/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

set -e

kubectl create -f deploy/

./rbac-lookup e2e-test |grep -v "No RBAC Bindings found"
printf "\n\n"
echo "***************************"
echo "** Install and Run Venom **"
echo "***************************"
printf "\n\n"

curl -LO https://github.com/ovh/venom/releases/download/v0.27.0/venom.linux-amd64
mv venom.linux-amd64 /usr/local/bin/venom
chmod +x /usr/local/bin/venom

cd /rbac-lookup/e2e
mkdir -p /tmp/test-results
venom run tests/* --log debug --output-dir=/tmp/test-results --strict
exit $?

18 changes: 18 additions & 0 deletions e2e/tests/00_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "2"
name: "Basic Operation"
vars:
timeout: 60s
vpa-wait: 30
testcases:
- name: Apply Manifests
steps:
- script: kubectl apply -f 00_assets/
- name: Rbac Lookup
steps:
- script: /rbac-lookup/rbac-lookup e2e-test
assertions:
- result.code ShouldEqual 0
- result.systemerr ShouldNotEqual "No RBAC Bindings found"
- name: Cleanup
steps:
- script: kubectl delete -f 00_assets/