-
Notifications
You must be signed in to change notification settings - Fork 524
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
testing/smoke: Add initial smoke tests #8458
Conversation
This patch adds an initial set of smoke tests which use the existing `ec_deployment` module for the underlying infrastructure and a bash script to drive the scripted smoke test cases. The script takes in a `MAJOR.MINOR` version combination. The initial smoke tests are slightly different depending if the major version is `7` or `8`, the former will be test upgrades `7.17.last-1` to `7.17.last`, while the latter, will upgrade from the previous minor to the current minor (`8.3.0`) will upgrade from `8.2.3` to `8.3.0`. The initial set of assertions is kept to a minimum to enable iterating over the approach rather than adding all the assertions in the first PR. Initially, we're testing that: - Create deployment succeeds - Data is sent to APM Server - Each of the events sent to APM Server can be found in Elasticsearch. - Upgrade to the next version succeeds. - Data is sent to the APM Server - Each of the events sent to APM Server can be found in Elasticsearch. As the last step and if any errors occur during the smoke test, the underlying infrastructure will be destroyed. I've chosen to use bash since it doesn't seem too bad with the current set of assertions, we can always improve it and write it in Go, but it seems more involved than what we need right now. Signed-off-by: Marc Lopez Rubio <[email protected]>
🌐 Coverage report
|
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.
LGTM with 1 concern, since we are using local backend, in the event of SIGKILL the trap command will not destroy terraform (cases like runners dying). This might lead to some cases where the infra will continue to exist like a zombie.
@lahsivjar I was thinking about using a cleanup task in jenkins even after the script finishes that runs This gives us the advantage of 1. we always try and clean up locally, 2. Jenkins will do it twice, and in the event the infrastructure has already been destroyed, the |
Motivation/summary
This patch adds an initial set of smoke tests which use the existing
ec_deployment
module for the underlying infrastructure and a bashscript to drive the scripted smoke test cases. The script takes in a
MAJOR.MINOR
version combination.The initial smoke tests are slightly different depending if the major
version is
7
or8
, the former will be test upgrades7.17.last-1
to7.17.last
, while the latter, will upgrade from the previous minor tothe current minor (
8.3.0
) will upgrade from8.2.3
to8.3.0
.The initial set of assertions is kept to a minimum to enable iterating
over the approach rather than adding all the assertions in the first PR.
Initially, we're testing that:
As the last step and if any errors occur during the smoke test, the
underlying infrastructure will be destroyed.
I've chosen to use bash since it doesn't seem too bad with the current
set of assertions, we can always improve it and write it in Go, but it
seems more involved than what we need right now.
I've created a gist with the output of the tested execution.
Checklist
- [ ] Update CHANGELOG.asciidoc- [ ] Update package changelog.yml (only if changes toapmpackage
have been made)How to test these changes
export your cloud credentials (export EC_API_KEY)
make smoketest SMOKETEST_VERSIONS=7.17,latest
-> Smoke tests passed!
)Related issues
Part of #8303