-
Notifications
You must be signed in to change notification settings - Fork 119
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
Update elastic-package test command to define each command separately #1886
Update elastic-package test command to define each command separately #1886
Conversation
💚 Build Succeeded
History
cc @mrodm |
|
||
func (r *runner) CanRunSetupTeardownIndependent() bool { | ||
return false | ||
} |
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.
👍 🔥
action := testTypeCommandActionFactory(runner) | ||
testTypeCmdActions = append(testTypeCmdActions, action) | ||
// Just used in pipeline and system tests | ||
// Keep it here for backwards compatbility |
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.
As you prefer, I would be ok with removing this flag from other test runners if it is doing nothing there.
|
||
var results []testrunner.TestResult | ||
for _, folder := range testFolders { | ||
r, err := testrunner.Run(ctx, testType, testrunner.TestOptions{ |
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.
Now that we have specific commands for each test runner, maybe we can call here the specific runner, with an specific set of options? This would also allow to remove the registry of tests.
Actually now we wouldn't even need the test runner interface, right? 🤔
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.
It looks like this could be possible, I'll check this out in a follow-up PR.
Relates #787
This PR defines each subcommand under
elastic-package test
in its own function. Each test runner command now defines:TestOptions
struct.This allows us to remove functions from the TestRunner interface:
TestFolderRequired
,CanRunPerDataStream
,CanRunSetupTeardownIndependent
Take the opportunity in this PR to add the test type into the filename written for the xUnit results. This will help us to identify easily which XML file to select/open.
The current regex used in Junit step (Buildkite) keeps matching:
elastic-package/.buildkite/pipeline.yml
Line 75 in 1765efb
How to test