#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

# build the test executable and make sure it's on the path
if [[ -z "${OPENSHIFT_SKIP_BUILD-}" ]]; then
  "${OS_ROOT}/hack/build-go.sh" "test/integration/integration.test"
fi
os::util::environment::update_path_var

gotest_flags="${GOTEST_FLAGS:-}"
sub_tests="${1:-}"

# Filter to run sub tests and turn up verbosity to show which tests will be run
if [[ -n "${sub_tests}" ]]; then
	gotest_flags+=" -run TestIntegration/${sub_tests} -v"
  COVERAGE_SPEC=" " DETECT_RACES=false TMPDIR="${BASETMPDIR}" TIMEOUT=45m GOTEST_FLAGS="${gotest_flags}" "${OS_ROOT}/hack/test-go.sh" "test/integration/runner"
else
  COVERAGE_SPEC=" " DETECT_RACES=false TMPDIR="${BASETMPDIR}" TIMEOUT=30m GOTEST_FLAGS="${gotest_flags}"" -run TestIntegration/Test[A-N]" "${OS_ROOT}/hack/test-go.sh" "test/integration/runner"
  COVERAGE_SPEC=" " DETECT_RACES=false TMPDIR="${BASETMPDIR}" TIMEOUT=30m GOTEST_FLAGS="${gotest_flags}"" -run TestIntegration/Test[O-Z]" "${OS_ROOT}/hack/test-go.sh" "test/integration/runner"

fi


#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

# build the test executable and make sure it's on the path
if [[ -z "${OPENSHIFT_SKIP_BUILD-}" ]]; then
  "${OS_ROOT}/hack/build-go.sh" "test/integration/integration.test"
fi
os::util::environment::update_path_var

gotest_flags="${GOTEST_FLAGS:-}"
sub_tests="${1:-}"

# Filter to run sub tests and turn up verbosity to show which tests will be run
if [[ -n "${sub_tests}" ]]; then
	gotest_flags+=" -run TestIntegration/${sub_tests} -v"
fi

COVERAGE_SPEC=" " DETECT_RACES=false TMPDIR="${BASETMPDIR}" TIMEOUT=45m GOTEST_FLAGS="${gotest_flags}" "${OS_ROOT}/hack/test-go.sh" "test/integration/runner"

Revert "Split integration runs into two separate invocations"
Revert "Split integration runs into two separate invocations"

This reverts commit 672db34525409dcd829b47ab19544c8a70340b3f.
