This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
[Ingest Manager] Use dockerized package registry in api integration tests #34
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.
Experimental
Implements elastic#61699
To run:
in the
x-pack
directory, run:In the main kibana directory, run
Port
12345
is used as an example here, it can be anything, but the environment variable has to be present for the tests to run at all.Changes
args
toDockerServerSpec
which are passed through todocker run
. These have to be arguments todocker run
, not to the whatever is run in the docker container.DockerServerService
tox-pack/test/epm_api_integration
and disables all other tests in that directory for now (These aren't currently run in CI, see [Ingest Manager] Rename and re-enable EPM api integration tests elastic/kibana#67943).docker ps -a
.DockerServerService
configuration / setup fromx-pack/test/functional
for now.Open questions
docker run
is started once per test lifecycle, which corresponds to aconfig.{js,ts}
file setting up the tests (?). It might be beneficial to be able to start and stop the dockerized executable from the tests themselves with different sets of arguments. That way, we could e.g. move the test fixtures closer to the tests themselves, and have finer granularity overall.config.{ts,js}
in them) or should we strive to move them to the 'common' test directories and add complexity to their setup? (This would be easier if starting the dockerized executable with different arguments was possible from within the tests, instead of the overall configuration, see above.)DockerServersService
couldn't be set up successfully, e.g. becauseprocess.env.INGEST_MANAGEMENT_PACKAGE_REGISTRY_PORT
wasn't set?