-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smoketest: Add APM Managed tests (#8477)
Adds two new smoke tests which migrate the APM Server from standalone to managed mode. All tests ingest data and asserts its existence in ES after the deployment has been created / upgraded. - `legacy-managed.sh`: Creates a `7.17.latest` deployment, migrates from standalone to managed mode. - `standalone-major-managed.sh`: Creates a `7.17.latest` deployment, upgrades to the `8.latest.latest`, and migrates from standalone to managed mode. The second test takes significantly longer since major version upgrades take a decent amount of time (~10m). Signed-off-by: Marc Lopez Rubio <[email protected]>
- Loading branch information
Showing
6 changed files
with
120 additions
and
30 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
VERSION=7.17 | ||
LATEST_VERSION=$(curl -s --fail https://artifacts-api.elastic.co/v1/versions/${VERSION} | jq -r '.version.builds[0].version') | ||
|
||
echo "-> Running ${LATEST_VERSION} standalone to ${LATEST_VERSION} managed upgrade" | ||
|
||
. $(git rev-parse --show-toplevel)/testing/smoke/lib.sh | ||
|
||
trap "terraform_destroy" EXIT | ||
|
||
terraform_apply ${LATEST_VERSION} | ||
healthcheck 1 | ||
send_events | ||
legacy_assert_events ${LATEST_VERSION} | ||
|
||
echo "-> Upgrading APM Server to managed mode" | ||
upgrade_managed ${LATEST_VERSION} | ||
healthcheck 1 | ||
send_events | ||
data_stream_assert_events ${LATEST_VERSION} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
VERSION=7.17 | ||
LATEST_VERSION=$(curl -s --fail https://artifacts-api.elastic.co/v1/versions/${VERSION} | jq -r '.version.builds[0].version') | ||
VERSIONS=$(curl -s --fail https://artifacts-api.elastic.co/v1/versions) | ||
NEXT_MAJOR_LATEST=$(echo ${VERSIONS} | jq -r '.versions[]' | grep -v 'SNAPSHOT' | grep '^8' | tail -1) | ||
|
||
echo "-> Running ${LATEST_VERSION} standalone to ${NEXT_MAJOR_LATEST} to ${NEXT_MAJOR_LATEST} managed" | ||
|
||
. $(git rev-parse --show-toplevel)/testing/smoke/lib.sh | ||
|
||
trap "terraform_destroy" EXIT | ||
|
||
terraform_apply ${LATEST_VERSION} | ||
healthcheck 1 | ||
send_events | ||
legacy_assert_events ${LATEST_VERSION} | ||
|
||
terraform_apply ${NEXT_MAJOR_LATEST} | ||
healthcheck 1 | ||
send_events | ||
data_stream_assert_events ${NEXT_MAJOR_LATEST} | ||
|
||
upgrade_managed ${NEXT_MAJOR_LATEST} | ||
healthcheck 1 | ||
send_events | ||
Assert there are 2 instances of the same event, since we ingested data twice. | ||
data_stream_assert_events ${NEXT_MAJOR_LATEST} 2 |
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