Add go-resource resources for Fleet Policies, what will allow to continue the refactors in test runners, in line with https://github.com/elastic/elastic-package/pull/1756. It also allows to define specific integration tests for policies management.
There is some code duplication with the system test runner, but the idea is to remove all this code from there in future refactors, leveraging the resources added here.
I took some opinionated decisions based on the known and predicted use cases, and the current logic:
Package policies are defined as part of the Agent policy. In theory it would be possible to manage them separately, but I think we don't need this in our tests, we always create and destroy the agent policy and its child package policies together.
Package policies need the root of the source code of the package, what allows to read information directly from the manifest. We could pass all the information in the definition itself, but it would make things too complicated, and in our use cases we always have the source code of the package.
Add go-resource resources for Fleet Policies, what will allow to continue the refactors in test runners, in line with https://github.com/elastic/elastic-package/pull/1756. It also allows to define specific integration tests for policies management.
I plan to use this for https://github.com/elastic/elastic-package/issues/947.
There is some code duplication with the system test runner, but the idea is to remove all this code from there in future refactors, leveraging the resources added here.
I took some opinionated decisions based on the known and predicted use cases, and the current logic: