Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

e2e tests minor patches #2225

Merged
merged 2 commits into from
Mar 18, 2024
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ help:
@echo ' Documentation:'
@echo ' docs - preview documentation website'
@echo ' metrics-docs - generate metrics reference documentation page'
@echo 'End-to-end tests: '
@echo ' e2e-test - run e2e tests'
@echo ' e2e-test E2E_BUILD_IMAGES=0 - run e2e tests without (re-)building images'
@echo ' e2e-test E2E_TESTS=./tests/e2e/tests/skeleton - run a specific e2e test'
Comment on lines +125 to +128
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just thinking we should do something like https://www.thapaliya.com/en/writings/well-documented-makefiles/, because many targets are missing from this help. But I'm not sure how to best document multiple options for one target then. (I mean, it's very helpful to have options documented, I'm just thinking out loud here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could something like

e2e-tests: ## run e2e tests, use E2E_BUILD_IMAGES=0 to avoid running images and E2E_TESTS=./tests/e2e/tests/skeleton ro run only the skeleton test

@echo 'Options:'
@echo ' TARGET_ARCH - target architecture to build for (e.g. amd64 or arm64)'
@echo ' BPF_TARGET_ARCH - target architecture for BPF progs, set by TARGET_ARCH'
Expand Down Expand Up @@ -238,6 +242,7 @@ else
endif
# Build image and operator images locally before running test. Set to 0 to disable.
E2E_BUILD_IMAGES ?= 1
E2E_TESTS ?= ./tests/e2e/tests/...

# Run an e2e-test
.PHONY: e2e-test
Expand All @@ -246,7 +251,7 @@ e2e-test: image image-operator
else
e2e-test:
endif
$(GO) test -p 1 -parallel 1 $(GOFLAGS) -gcflags=$(GO_BUILD_GCFLAGS) -timeout $(E2E_TEST_TIMEOUT) -failfast -cover ./tests/e2e/tests/... ${EXTRA_TESTFLAGS} -fail-fast -tetragon.helm.set tetragon.image.override="$(E2E_AGENT)" -tetragon.helm.set tetragonOperator.image.override="$(E2E_OPERATOR)" -tetragon.helm.url="" -tetragon.helm.chart="$(realpath ./install/kubernetes/tetragon)" $(E2E_BTF_FLAGS)
$(GO) test -p 1 -parallel 1 $(GOFLAGS) -gcflags=$(GO_BUILD_GCFLAGS) -timeout $(E2E_TEST_TIMEOUT) -failfast -cover $(E2E_TESTS) ${EXTRA_TESTFLAGS} -fail-fast -tetragon.helm.set tetragon.image.override="$(E2E_AGENT)" -tetragon.helm.set tetragonOperator.image.override="$(E2E_OPERATOR)" -tetragon.helm.url="" -tetragon.helm.chart="$(realpath ./install/kubernetes/tetragon)" $(E2E_BTF_FLAGS)

TEST_COMPILE ?= ./...
.PHONY: test-compile
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var Opts = Flags{
},
KeepExportData: false,
InstallCilium: true,
CiliumVersion: "v1.12.6",
CiliumVersion: "v1.15.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#renovateit We can at least add a note to Renovate's draft PRs to make sure it's updated I guess?

}

func init() {
Expand Down
Loading