This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
feat: support using local Beats repository in the tests #688
Merged
mdelapenya
merged 9 commits into
elastic:master
from
mdelapenya:668-use-beats-repo-for-binaries
Feb 3, 2021
Merged
feat: support using local Beats repository in the tests #688
mdelapenya
merged 9 commits into
elastic:master
from
mdelapenya:668-use-beats-repo-for-binaries
Feb 3, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdelapenya
commented
Feb 1, 2021
fileName = fmt.Sprintf("%s-%s-%s-%s.%s", artifact, version, OS, arch, extension) | ||
} | ||
|
||
fileNamePath := path.Join(distributions, fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an internal Exists
method at the CLI side that we could reuse, but it's not exported. Thinking about exposing it
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
|
cachedout
approved these changes
Feb 2, 2021
mdelapenya
commented
Feb 2, 2021
10 tasks
the support for windows is logged separately and being considered for near term (Q1) roll out. |
jenkins run the tests please |
mdelapenya
commented
Feb 3, 2021
Same errors as in master, merging |
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
This was referenced Feb 3, 2021
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
mdelapenya
added a commit
that referenced
this pull request
Feb 3, 2021
* feat: use local beats directory for elastic-agent installers * docs: document BEATS_LOCAL_PATH variable * chore: check that the local file exists * chore: add unit tests for the BEATS_LOCAL_PATH variable * chore: simplify logic after test coverage * chore: enrich test name * chore: rename test * chore: move default values to the end of the descriptions * docs: clarify local path for Beats
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It supports using the local copy of Beats repo to fetch the elastic-agent binaries that were already built from Beats build system.
It enables this feature with the
BEATS_LOCAL_PATH
environment variable. If the path defined in the variable exists will use it as base directory to build a path to the distributions dir, which is:${BEATS_LOCAL_PATH}/x-pack/elastic-agent/build/distributions
.Why is it important?
It will allow developers not to wait for the packaging job to run the E2E tests locally, consuming local artifacts produced by their own build.
Checklist
make notice
in the proper directory)Author's Checklist
How to test this PR locally
2a. run the tests from a non existen path
It should fail with:
Related issues
Follow-ups
At this moment it's not loading the Docker images for the stand-alone images. I need to figure out how to create a Docker installer that loads the image using the PreInstall functions in the installer. I wanted to share this code to receive feedback the soonest.