Skip to content

Commit

Permalink
Remove FOCUS and SKIP, use TEST_ARGS instead
Browse files Browse the repository at this point in the history
These aren't meaningful in any context other than E2E, and in that
context we now have `TEST_ARGS` which can be used to pass any arguments
to ginkgo.

When needed, one can use e.g. `make e2e TEST_ARGS='-ginkgo.skip="..."'`

Signed-off-by: Mike Kolesnik <[email protected]>
  • Loading branch information
mkolesnik authored and skitt committed Jan 2, 2023
1 parent 5baff63 commit abaf518
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG BASE_BRANCH
FROM quay.io/submariner/shipyard-dapper-base:${BASE_BRANCH}

ARG PROJECT
ENV DAPPER_ENV="QUAY_USERNAME QUAY_PASSWORD MAKEFLAGS FOCUS SKIP PLUGIN TEST_ARGS E2E_TESTDIR GITHUB_USER GITHUB_TOKEN USING" \
ENV DAPPER_ENV="QUAY_USERNAME QUAY_PASSWORD MAKEFLAGS PLUGIN TEST_ARGS E2E_TESTDIR GITHUB_USER GITHUB_TOKEN USING" \
DAPPER_SOURCE=/go/src/github.com/submariner-io/${PROJECT} DAPPER_DOCKER_SOCKET=true
ENV OVN_DIR=${DAPPER_SOURCE}/ovn-kubernetes
ENV DAPPER_OUTPUT=${DAPPER_SOURCE}/output
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ MULTIARCH_IMAGES ?= nettest
EXTRA_PRELOAD_IMAGES := $(PRELOAD_IMAGES)
PLATFORMS ?= linux/amd64,linux/arm64
NON_DAPPER_GOALS += images multiarch-images
FOCUS ?=
SKIP ?=
PLUGIN ?=

export BASE_BRANCH OCM_BASE_BRANCH
Expand Down
2 changes: 1 addition & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export CABLE_DRIVER DEPLOYTOOL IMAGE_TAG LIGHTHOUSE
TESTDIR ?= test/e2e
LAZY_DEPLOY ?= true
SUBCTL_VERIFICATIONS ?= connectivity
export FOCUS LAZY_DEPLOY SKIP SUBCTL_VERIFICATIONS TEST_ARGS TESTDIR
export LAZY_DEPLOY SUBCTL_VERIFICATIONS TEST_ARGS TESTDIR

# Specific to `reload-images`
export RESTART ?= none
Expand Down
10 changes: 3 additions & 7 deletions scripts/shared/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
set -em -o pipefail
source "${SCRIPTS_DIR}/lib/utils"

# shellcheck disable=SC2206 # Split on purpose
ginkgo_args=(${TEST_ARGS})
[[ -n "${FOCUS}" ]] && ginkgo_args+=("-ginkgo.focus=${FOCUS}")
[[ -n "${SKIP}" ]] && ginkgo_args+=("-ginkgo.skip=${SKIP}")

print_env FOCUS LAZY_DEPLOY SKIP SUBCTL_VERIFICATIONS TEST_ARGS TESTDIR
print_env LAZY_DEPLOY SUBCTL_VERIFICATIONS TEST_ARGS TESTDIR
source "${SCRIPTS_DIR}/lib/debug_functions"

### Functions ###
Expand All @@ -32,11 +27,12 @@ function generate_kubecontexts() {
function test_with_e2e_tests {
cd "${DAPPER_SOURCE}/${TESTDIR}"

# shellcheck disable=SC2086 # TEST_ARGS is split on purpose
${GO:-go} test -v -timeout 30m -args -test.timeout 15m \
-submariner-namespace $SUBM_NS "${clusters[@]/#/-dp-context=}" \
-ginkgo.v -ginkgo.randomizeAllSpecs -ginkgo.trace \
-ginkgo.reportPassed -ginkgo.reportFile "${DAPPER_OUTPUT}/e2e-junit.xml" \
"${ginkgo_args[@]}" 2>&1 | tee "${DAPPER_OUTPUT}/e2e-tests.log"
$TEST_ARGS 2>&1 | tee "${DAPPER_OUTPUT}/e2e-tests.log"
}

function test_with_subctl {
Expand Down

0 comments on commit abaf518

Please sign in to comment.