Skip to content
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

Add integration tests #48

Open
pablochacin opened this issue May 20, 2022 · 1 comment
Open

Add integration tests #48

pablochacin opened this issue May 20, 2022 · 1 comment

Comments

@pablochacin
Copy link
Contributor

pablochacin commented May 20, 2022

Some features, such as those proposed in #47 are intended to trigger complex behaviours in Kubernetes beyond the creation of some objects.

It can be argued that these features should be tested using unit tests that only verify that the xk6-kubernetes code being tested calls the Kubernetes API with the expected parameters (for example, create an object with the correct definition). However, this type of tests cannot guarantee that the resulting behavior in a live cluster is the expected. For instance, it cannot check that the developer has an incorrect understanding of the object's parameters to be used. Therefore, integration tests against a live Kubernetes cluster may be desirable.

One key question to resolve as a project is which tools to use for such tests in order to automate its execution. Multiple tools exits in the Kubernetes ecosystem such as :

Even when it is not strictly necessary to agree on a tool (as tests should only relay on standard Kubernetes APIs) it is convenient to document the process of setting up tests for at least one tool. Also, it is convenient that these tools are executed in the CI pipelines and therefore the compatibility with the CI/CD infrastructure is a key requirement.

@pablochacin pablochacin mentioned this issue Oct 10, 2022
@pablochacin
Copy link
Contributor Author

There is an implementation of this approach in the xk6-disruptor extension's cluster package which could be extracted as an independent package and be reused here in xk6-kubernetes for e2e tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant