-
Notifications
You must be signed in to change notification settings - Fork 117
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
[Feature Request] Adding flag to run system tests without cleanup #582
Comments
I had been commenting out the code that deletes events in the system test running so I could build dashboards so I think this would be a good feature to add. I also manually go in to Kibana to grab data for sample_event.json after running the system tests. If there were an option to dump the system test events to file I would use that to find file a suitable event for the |
Temporarily you can use the "timeout" flag to defer cleanup of documents. |
Maybe we should think specifically about the use case of building dashboards. For example, instead of having a flag to avoid cleanup of system tests, we could maybe have a command that starts the service and configures the agent to collect data from it. It could be a subcommand of In a more general sense, it may be also nice to add some mechanism to configure generators, that can be used for any purpouse that needs real-like data (sample data for dashboards, performance testing, mocking services for tests...).
For this it'd be nice to have something as the conditions mechanism we have in Metricbeat, so events are still collected automatically, and the selection factor can be translated to config or code. Related: #773. Said that, I am not oposed to have some mechanism to control tear downs 🙂 But for these specific use cases I would prefer to have more specific solutions. |
I like the idea of a specialized command. |
Thinking about options for this issue, I see some different approaches. Adding a subcommand or parameter under
Adding a subcommand or parameter under
Adding a subcommand or parameters under
cc @elastic/ecosystem |
@mrodm could you add the pros/cons, or if you have a prefered option? I like this workflow, it is explicit about the different steps:
Is the On the two first cases we would still need to add some flag to
|
I would prefer the first option too, as you mention it is more explicit:
I thought that
Yes, that's right. That parameter should be added too. And, should it also be added a new command/subcommand to tear-down the service under An example of this scenario:
|
TLDR; Thinking about the scope of
+1 to don't change the behaviour or current install command. The workflow you mention looks good, with the only point that I wouldn't mix policies with package installation (this is always a bit mixed, but let's try to avoid that here). I think I would prefer to have the policy assigned in It could be done with a new flag:
As the command works now, it is executed on the foreground and stops the service on interruption. We should remove the policy when stopping the service too. Regarding the test commands, they would likely work with this workflow. As a different task, maybe we could have the following ones:
That would translate into refactoring the test runner interface to split the |
Looking at this offline with @jsoriano, it has been checked that in order to run a service and configure it properly so the elastic-agent can retrieve the documents, it is needed to have available the settings that are used currently in system tests. For instance zoom test config Among others it is needed to have the policy template name, input, datastream among others. For that, we have been checking that it could be worthy to focus on add this functionality into It could be started by adding just the subcommands setup and teardown:
Taken into account that running |
Recently we have taken up projects such as Lens Migration, and TSDB enablement. Having the below-mentioned abilities really would have helped the project. Instead, some of us tweaked the elastic-package code to achieve the functionalities. But, it is good to make these features available to all so that they could take benefit of it.
Upvoting the feature request and also placing a request for prioritising, knowing the benefits of the above requirement. |
Closing this issue after merging #1250 |
In certain usecases it would be preferred that we run our system tests without doing the cleanup process at the end.
For example when creating dashboards for a package that we only have local testdata for, that we cannot integrate with properly, ingesting the test data is crucial for dashboard creation.
Adding this issue after a quick discussion with @mtojek on the subject, so we can look into it further.
The text was updated successfully, but these errors were encountered: