Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add option to run tests on non-Intel architectures #238

Merged
merged 1 commit into from
Mar 3, 2021
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ DATE ?= $(shell date +%FT%T%z)
KO_DATA_PATH = $(shell pwd)/cmd/$(TARGET)/kodata
TARGET = kubernetes
CR = config/default
PLATFORM := $(if $(PLATFORM),--platform $(PLATFORM))

GOLANGCI_VERSION = v1.30.0

Expand Down Expand Up @@ -67,7 +68,7 @@ bin/%: cmd/% FORCE

.PHONY: apply
apply: | $(KO) $(KUSTOMIZE) ; $(info $(M) ko apply on $(TARGET)) @ ## Apply config to the current cluster
$Q $(KUSTOMIZE) build config/$(TARGET) | $(KO) apply -f -
$Q $(KUSTOMIZE) build config/$(TARGET) | $(KO) apply $(PLATFORM) -f -

.PHONY: apply-cr
apply-cr: | ; $(info $(M) apply CRs on $(TARGET)) @ ## Apply the CRs to the current cluster
Expand Down
7 changes: 5 additions & 2 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ source $(dirname $0)/e2e-common.sh

# Script entry point.
TARGET=${TARGET:-kubernetes}
# In case if KUBECONFIG variable is specified, it will be used for `go test`
KUBECONFIG_PARAM=${KUBECONFIG:+"--kubeconfig $KUBECONFIG"}

echo "Running tests on ${TARGET}"

[[ -z ${E2E_DEBUG} ]] && initialize $@
Expand All @@ -30,8 +33,8 @@ header "Setting up environment"
install_operator_resources

header "Running Go e2e tests"
go_test_e2e -timeout=20m ./test/e2e/common || failed=1
go_test_e2e -timeout=20m ./test/e2e/${TARGET} || failed=1
go_test_e2e -timeout=20m ./test/e2e/common ${KUBECONFIG_PARAM} || failed=1
go_test_e2e -timeout=20m ./test/e2e/${TARGET} ${KUBECONFIG_PARAM} || failed=1

(( failed )) && fail_test
success