-
Notifications
You must be signed in to change notification settings - Fork 129
[system tests] Allow setting an optional prefix for the service TestRunID #2744
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -483,7 +483,12 @@ func (r *tester) createServiceInfo() (servicedeployer.ServiceInfo, error) { | |
| svcInfo.Name = r.testFolder.Package | ||
| svcInfo.Logs.Folder.Local = r.locationManager.ServiceLogDir() | ||
| svcInfo.Logs.Folder.Agent = ServiceLogsAgentDir | ||
| svcInfo.Test.RunID = common.CreateTestRunID() | ||
|
|
||
| prefix := "" | ||
| if v, found := os.LookupEnv("ELASTIC_PACKAGE_PREFIX_SERVICE_TEST_RUN_ID"); found && v != "" { | ||
mrodm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| prefix = v | ||
| } | ||
| svcInfo.Test.RunID = common.CreateTestRunIDWithPrefix(prefix) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In case of using the terraform service deployer, a part of updating the RunID used in as terraform variable, the alias used to render the policy templates in tests needs to be set to the same value as the terraform variable. This is needed for instance for |
||
|
|
||
| if r.runTearDown || r.runTestsOnly { | ||
| logger.Debug("Skip creating output directory") | ||
|
|
||
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.
This function is used also in other places (e.g. adding a random suffix to policies), those can be kept as they are now.
For instance:
elastic-package/internal/testrunner/runners/system/tester.go
Line 1021 in be35e60