-
Notifications
You must be signed in to change notification settings - Fork 688
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
Integration test harness survey and notes #2222
Comments
xref #1155 |
Survey of Existing Ingress Controller Integration TestsKnative Serving
Nginx Ingress
Gloo
Kourierhttps://github.com/3scale/kourier
Ambassadorhttps://github.com/datawire/ambassador
CSI Conformance testingMost relevant example for testing core Kubernetes API extension points. https://kubernetes-csi.github.io/docs/functional-testing.html kube-bench (CIS checks)
|
There are many harnesses that run end-to-end tests against Kubernetes Tests should be DeclarativeSome projects write tests directly in Go code. The tests are driven by
Problem (1) reduces the audience of people who are likely to build A better approach is to express the test in a declarative DSL or data Tests should be SteppedIt is common for open-coded tests to just run actions and perform checks Instead, if the test is expressed as a sequence of steps, the harness Test steps can either be actions (applying an observable change to the Tests should be DebuggableIt is typical to debug Kubernetes end-to-end tests by hacking the test A test framework should be able to inspect the state of tests enough Test steps should be ObservableThere are many kinds of observability. The questions that a test harness Some kinds of test runners have little insight into what the test is Test Action TypesTest actions are steps that are intended to alter the state of the Focusing on the Kubernetes API, the harness should be able to perform
The obvious way to declaratively express creating a Kubernetes object is Test actions can be expected to either succeed or fail. Successfully To test the result of a Kubernetes API action, tooling needs to understand Since YAML can be verbose, the test suite could support a library of There are a number of ways to update existing objects. In many cases, There's no existing YAML syntax to delete objects. Test Check TypesIn the most general case, checks are arbitrary tests executed against For Ingress controllers, it is essential that checks are able to be Check Timing IssuesAll the systems involved in a Kubernetes cluster are eventually In some cases, there may be deterministic conditions that can be tested In other cases, we are testing some delayed or emergent effect of an Test ContextTo be able to write tests in a generic way, the harness needs to be able Kubernetes Test metadataThe test harnesss should annotate any Kubernetes objects that it creates Any standard objects that are created as side-effects of the test harness There are a number of possible uses for Kubernetes metadata:
Sample TestsThis test that ensures that an HTTP service is resiliant to the
This test ensures that traffic weighting works as expected.
Resources
|
Closing, since there's no associated action here. |
This issue captures notes, requirements and proposals about an integration test harness.
The text was updated successfully, but these errors were encountered: