Skip to content

Conversation

@endorama
Copy link
Contributor

Still very WIP, I want to document how system tests work and some nuances.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 10, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-03-22T11:33:01.858+0000

  • Duration: 17 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 582
Skipped 1
Total 583

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

We have already a doc file describing system tests. Please extend that one.

@endorama endorama marked this pull request as ready for review March 22, 2022 10:12
@endorama endorama requested a review from mtojek March 22, 2022 10:12

## Stack version

The tests use the [default version](https://github.com/elastic/elastic-package/blob/main/internal/install/stack_version.go#L9) `elastic-package` provides.
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean by that? Tests don't start the cluster, so can't have an influence on its version. In the Integrations repository, we select the stack based on Kibana version constraints.

If you're referring to the elastic-package repository, please move this point to the "Continuous Integration" section, as this file contains generic information also valid for Integrations repository.


**NOTE**: Terraform variables passed as environment variables require to be prefixed with `TF_VAR_`. These variables are not available in test case definitions because they are [not injected](https://github.com/elastic/elastic-package/blob/f5312b6022e3527684e591f99e73992a73baafcf/internal/testrunner/runners/system/servicedeployer/terraform_env.go#L43) in the test environment.

#### Cloud Provider access
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename this point as CI support. It isn't a mandatory step for regular users, it's more for maintainers.

Placeholders used in the `test-<test_name>-config.yml` must be enclosed in `{{` and `}}` delimiters, per Handlebars syntax.
**NOTE**: Terraform variable environment variable form (prefixed with `TF_VAR_`) is not injected and cannot be used as placeholders (their value would always be empty).
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Terraform variable environment variable
nit: as placeholder

## Continuous Integration
`elastic-package` runs a set of system tests on some dummy packages to ensure it's functionalities work as expected. This allows to test changes affecting package testing within `elastic-package` before merging and releasing the changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe link the dummy packages with a directory in Github.

The tests use the [default version](https://github.com/elastic/elastic-package/blob/main/internal/install/stack_version.go#L9) `elastic-package` provides.
You can override this value by changing it in your PR if needed. To update the default version always created a dedicated PR.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: always create

`elastic-package` runs a set of system tests on some [dummy packages](https://github.com/elastic/elastic-package/tree/main/test/packages) to ensure it's functionalities work as expected. This allows to test changes affecting package testing within `elastic-package` before merging and releasing the changes.
Tests uses a set of environment variables that are set at the beginning of the `Jenkinsfile`.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Tests use

Tests uses a set of environment variables that are set at the beginning of the `Jenkinsfile`.
The exposed environment variables are passed to the test runners through service deployer specific configurations (refer to the service deployer section for further details).
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: service deployer specific configurations

@mtojek mtojek self-requested a review March 22, 2022 11:37
@endorama endorama merged commit 1a40161 into main Mar 22, 2022
@endorama endorama deleted the endorama-patch-1 branch March 22, 2022 13:14
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.

5 participants