consolidate kibana api to internal project structure#992
consolidate kibana api to internal project structure#992adam-stokes wants to merge 1 commit intomasterfrom
Conversation
Move all relevant kibana api calls into the golang project standard of `internal/kibana`. Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
|
I'm a bit confused by the word "moving" in the description of this PR. I see files being added but nothing being moved or otherwise deleted. Is this PR purely additive or is it a refactor? Perhaps a description of where this code or logic is being moved from would make things more clear. Thanks! |
@cachedout Thanks! I updated the PR with some additional context, let me know if you have any questions |
|
IIRC there are unit tests for the client. If possible please keep them (with updates) during the refactor |
| ) | ||
|
|
||
| // UnEnrollAgent unenrolls agent from fleet | ||
| func (c *Client) UnEnrollAgent(hostname string, force bool) error { |
There was a problem hiding this comment.
NIT: could you reorder the methods alphabetically when possible? That would help when searching through the file
There was a problem hiding this comment.
I think that once this is done, we can merge this PR 😉
|
Will close this in favor of #1008 |
|
Closing as per #992 (comment) |
Add all relevant kibana api calls into the golang project standard of
internal/kibana.Signed-off-by: Adam Stokes 51892+adam-stokes@users.noreply.github.com
What does this PR do?
This PR is the start of some refactoring to get the project in a more standardized layout. It adds all the related kibana api calls into
internal/kibanaand also has additional api calls added to abstract out more of the work that is being handled in the testsuites. Currently, this is only an additive PR to get the bits in place for a further refactor of the testsuites and cli.Why is it important?
It is nice to have all the relevant api calls under a single location that is easily identifiable
Checklist
- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature works- [ ] I have run the Unit tests for the CLI, and they are passing locally- [ ] I have noticed new Go dependencies (runmake noticein the proper directory)How to test this PR locally
Nothing to test at this moment as there are several subsequent PR's that will utilize this new api in the scenario testsuites
Related issues
Follow-ups
Once this PR is approved and merge I have several additional changes that make use of this code in the testsuites.
This is part of a larger refactor https://github.com/elastic/e2e-testing/compare/feat-kibana-refactor that gives a better idea of where these new additions will be utilized and which of the original code is moved/removed. Most of the code related to this PR lives in
cli/services/kibana.goand additional code lives ine2e/_suites/fleet/fleet.goe2e/_suites/fleet/integrations.go. In the referencedfeat-kibana-refactorbranch you can get a better idea of how that looks and get a feel for the direction I am taking.