Integrate test framework tests properly
The test framework can now run properly with `go test` and we can remove - our test wrapper - special handling of tests for the test framewoek
This commit is contained in:
parent
98faa6a9dc
commit
1513093427
|
@ -9,6 +9,7 @@ before_install:
|
|||
- source ./bin/consider-early-travis-exit.sh
|
||||
- go get -u github.com/golang/lint/golint
|
||||
- go get -u golang.org/x/tools/cmd/goimports
|
||||
- go get -u github.com/onsi/ginkgo/ginkgo
|
||||
|
||||
# Install must be set to prevent default `go get` to run.
|
||||
# The dependencies have already been vendored by `dep` so
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Make sure, we run in the root of the repo and
|
||||
# therefore run the tests on all packages
|
||||
base_dir="$( cd "$(dirname "$0")/.." && pwd )"
|
||||
cd "$base_dir" || {
|
||||
echo "Cannot cd to '$base_dir'. Aborting." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
rc=0
|
||||
|
||||
go_dirs() {
|
||||
|
@ -18,14 +26,12 @@ echo "Running go vet"
|
|||
go vet -all ./...
|
||||
rc=$((rc || $?))
|
||||
|
||||
echo "Running go test"
|
||||
go list ./... | grep -vF pkg/framework/test | xargs go test -v
|
||||
echo "Installing test binaries"
|
||||
./pkg/framework/test/scripts/download-binaries.sh
|
||||
rc=$((rc || $?))
|
||||
|
||||
echo "Running test framework tests"
|
||||
go get github.com/onsi/ginkgo/ginkgo \
|
||||
&& ./pkg/framework/test/scripts/download-binaries.sh \
|
||||
&& ./pkg/framework/test/scripts/run-tests.sh
|
||||
echo "Running go test"
|
||||
go test -v ./...
|
||||
rc=$((rc || $?))
|
||||
|
||||
exit $rc
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# Use DEBUG=1 ./scripts/run-tests.sh to get debug output
|
||||
[[ -z "${DEBUG:-""}" ]] || set -x
|
||||
|
||||
GINKGO="ginkgo"
|
||||
if [[ -n "${GINKGO_WATCH:-""}" ]] ; then
|
||||
GINKGO="$GINKGO watch"
|
||||
fi
|
||||
|
||||
if [[ -z ${GINKGO_PERFORMANCE:-""} ]] ; then
|
||||
GINKGO="$GINKGO -skipMeasurements"
|
||||
fi
|
||||
|
||||
test_framework_dir="$(cd "$(dirname "$0")/.." ; pwd)"
|
||||
|
||||
export KUBE_ASSETS_DIR="${test_framework_dir}/assets/bin"
|
||||
|
||||
$GINKGO -r "${test_framework_dir}"
|
Loading…
Reference in New Issue