From b4a3f9678bdca8f55d20fd8807a779a990f73b91 Mon Sep 17 00:00:00 2001 From: Alejandro Rosero Date: Mon, 4 Feb 2019 12:48:46 -0500 Subject: [PATCH] BDD Suite: Add scripts and documentation --- hack/run-bdd-suite.sh | 21 +++++++++++++++++++++ hack/shellcheck.sh | 1 + tests/bdd-smoke/README.md | 15 +++++++++++++++ 3 files changed, 37 insertions(+) create mode 100755 hack/run-bdd-suite.sh create mode 100644 tests/bdd-smoke/README.md diff --git a/hack/run-bdd-suite.sh b/hack/run-bdd-suite.sh new file mode 100755 index 00000000000..3c2e87c185d --- /dev/null +++ b/hack/run-bdd-suite.sh @@ -0,0 +1,21 @@ +#! /usr/bin/sh +# Example: ./hack/run-bdd-suite.sh tests/bdd-smoke/suites/config/libvirt + +if [ "$IS_CONTAINER" != "" ]; then + mkdir ~/.ssh + echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCc4amSo5Z59mH4bUgZ4M8A1sURg+qUKkYjZ9+0fft5/OmSbe34Ge9gUrJ8UKNpmbC+W26v9qKX21NCYct1QOgIlVqyIjZUll0NfcJXToAd1o2GrItMlpQEpXfQGNOjZtWu1uyO187qbGMwnq8e8EH9R1IJZwTI6sOVnc8sSyzydQ==" > ~/.ssh/id_rsa.pub + + TAGS=libvirt ./hack/build.sh + GOPATH_ORI=$GOPATH + export GOPATH=$GOPATH:/go/src/github.com/openshift/installer/tests/bdd-smoke/vendor + go build -o "bin/ginkgo" github.com/onsi/ginkgo/ginkgo + export GOPATH=$GOPATH_ORI + ./bin/ginkgo "${@}" +else + podman run --rm \ + --env IS_CONTAINER=TRUE \ + --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ + --workdir /go/src/github.com/openshift/installer \ + docker.io/openshift/origin-release:golang-1.10 \ + ./hack/run-bdd-suite.sh "${@}" +fi; \ No newline at end of file diff --git a/hack/shellcheck.sh b/hack/shellcheck.sh index 2941dc9987d..994bc18ccc9 100755 --- a/hack/shellcheck.sh +++ b/hack/shellcheck.sh @@ -5,6 +5,7 @@ if [ "$IS_CONTAINER" != "" ]; then -path "${TOP_DIR}/vendor" -prune \ -o -path "${TOP_DIR}/.build" -prune \ -o -path "${TOP_DIR}/tests/smoke/vendor" -prune \ + -o -path "${TOP_DIR}/tests/bdd-smoke/vendor" -prune \ -o -path "${TOP_DIR}/tests/smoke/.build" -prune \ -o -type f -name '*.sh' -exec shellcheck --format=gcc {} \+ else diff --git a/tests/bdd-smoke/README.md b/tests/bdd-smoke/README.md new file mode 100644 index 00000000000..b0375a5543d --- /dev/null +++ b/tests/bdd-smoke/README.md @@ -0,0 +1,15 @@ +BDD Tests +======== + +Required +-------- +* podman + +Test Suites +-------- +*Configuration Tests* + +Run the configuration level tests for libvirt (no cluster runnning required): +``` +./hack/run-bdd-suite.sh tests/bdd-smoke/suites/config/libvirt +``` \ No newline at end of file