-
Notifications
You must be signed in to change notification settings - Fork 5
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
tests: initial commit of the manual tests #100
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Leonardo Alminana <[email protected]>
Let's adapt these over to BATS and then can go straight in as integration tests: https://bats-core.readthedocs.io/en/stable/ We likely need to support a configurable version or location, I think the current assumption is native binaries but containers may be better - or we could make this a Linux matrix test of various packages: install the package first then run it through tests. |
@leonardo-albertovich anything specific you still need on top of this? Cluster creation, etc.? |
Just the test cases for filter_kubernetes, filter_aws and filter_ecs. |
So
|
Let's move the common functions into the helpers file for BATS. |
We can do that once I'm done with the PR but right now all I need are those three test cases, keep in mind that at the moment this was shared as a reference. |
Please do not merge this PR.
In order to use these tests you need to set your working directory to tests/leonardo and then execute the outer shell scripts one by one.
Each one of these will start a data source (fluent-bit, vector, opentelemetry collector, shell scripts, etc.) and a data sinc which is the fluent-bit binary we are trying to test.
The path to the binary (as well as other settings) can be passed through environment variables, otherwise the shell script will look for fluent-bit inside the bin directory and its parents bin directory (in case this is executed inside the build directory of a fluent-bit working tree).
The scripts will automatically elevate privileges when required and also perform a crude teardown after the test is terminated.
These are manual tests, there is no automatic compliance detection at all so far and that's not the intention either.