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

tests/e2e: improvements to testing workflow #385

Merged
merged 3 commits into from
Sep 6, 2022
Merged

Conversation

willfindlay
Copy link
Contributor

  • Add a -tetragon.btf flag to tests/e2e for easily using a custom BTF file in a KinD cluster
  • Add some extra flags to the Makefile for more easily configuring test options, including a BTF file to use

This commit adds a convenience flag for easily passing a BTF file to the end-to-end tests
to be used instead of system BTF. Works only for KinD tests.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay willfindlay requested a review from a team as a code owner September 6, 2022 14:19
This commit adds the following new flags to the Makefile for running e2e tests. They
should be particularly helpful in environments where system BTF is not available, e.g.
4.19 kernels.

- E2E_AGENT: agent image to use for tests, defaults to  "cilium/tetragon:$(DOCKER_IMAGE_TAG)"
- E2E_OPERATOR: operator image to use for tests, defaults to "cilium/tetragon-operator:$(DOCKER_IMAGE_TAG)"
- E2E_BTF: if non-empty, btf file to use instead of system BTF, defaults to empty
- E2E_BUILD_IMAGES: if non-zero, build local images before running tests, default is 1

With these changes, running e2e tests on 4.19 should be as simple as:

    make e2e-test E2E_BTF=/path/to/btf

And running tests with CI images should be as simple as, for example:

    make e2e-test E2E_AGENT=quay.io/cilium/tetragon-ci:1e568613d853bbb83587d8f7f80a2aa56c8eaf59 E2E_OPERATOR=quay.io/cilium/tetragon-operator-ci:1e568613d853bbb83587d8f7f80a2aa56c8eaf59 E2E_BUILD_IMAGES=0

Signed-off-by: William Findlay <will@isovalent.com>
Avoid duplicating the e2e test command in CI and use make instead now that we have a fancy
new target.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay willfindlay removed the request for review from kkourt September 6, 2022 16:57
@willfindlay willfindlay merged commit 41a5561 into main Sep 6, 2022
@willfindlay willfindlay deleted the pr/willfindlay/btf branch September 6, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants