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

Added help method to print out failed tests #142

Merged
merged 1 commit into from
Jun 9, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/conftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ jobs:
uses: actions/checkout@v2

- name: Conftest
uses: redhat-cop/github-actions/confbatstest@master
uses: redhat-cop/github-actions/confbatstest@master
with:
tests: _test/conftest.sh
3 changes: 3 additions & 0 deletions _test/_helpers.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
print_err() {
if [ "$1" -ne 0 ]; then echo "$2" | grep "not ok"; fi
}
81 changes: 81 additions & 0 deletions _test/conftest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env bats

load _helpers

@test "basic-dotnet-core/.openshift" {
run conftest test basic-dotnet-core/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "basic-nginx/.openshift" {
run conftest test basic-nginx/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "basic-spring-boot-tekton/.openshift" {
run conftest test basic-spring-boot-tekton/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "basic-spring-boot/.openshift basic-tomcat/.openshift" {
run conftest test basic-spring-boot/.openshift basic-tomcat/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "blue-green-spring/.openshift" {
run conftest test blue-green-spring/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "cucumber-selenium-grid/applier/projects" {
run conftest test cucumber-selenium-grid/applier/projects --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "cucumber-selenium-grid/applier/templates" {
run conftest test cucumber-selenium-grid/applier/templates --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "jenkins-s2i multi-cluster-multi-branch-jee/.openshift" {
run conftest test jenkins-s2i multi-cluster-multi-branch-jee/.openshift --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/image-mirror-example/.applier/projects" {
run conftest test multi-cluster-spring-boot/image-mirror-example/.applier/projects --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/image-mirror-example/.applier/templates" {
run conftest test multi-cluster-spring-boot/image-mirror-example/.applier/templates --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/skopeo-example/.applier/projects" {
run conftest test multi-cluster-spring-boot/skopeo-example/.applier/projects --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/skopeo-example/.applier/templates" {
run conftest test multi-cluster-spring-boot/skopeo-example/.applier/templates --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}

@test "secure-spring-boot/.openshift-applier/templates" {
run conftest test secure-spring-boot/.openshift-applier/templates --output tap
print_err "$status" "$output"
[ "$status" -eq 0 ]
}
79 changes: 0 additions & 79 deletions _test/tests.bats

This file was deleted.