GoogleCloudPlatform / metacontroller

Lightweight Kubernetes controllers as a service
https://metacontroller.app/
Apache License 2.0
792 stars 105 forks source link

Add integration test framework and sample test. #136

Closed enisoc closed 5 years ago

enisoc commented 5 years ago

This adds a framework for integration tests that run against a bare kube-apiserver with no other Kubernetes components (i.e. no kubelets). Unlike the end-to-end tests in examples/, these integration tests don't require an actual Kubernetes cluster. This allows efficient testing of Metacontroller behavior at the level of its interaction with Kubernetes API objects, after which the respective implementations of those APIs are assumed to work.

This also includes the first sample test, which exercises a simple CompositeController sync webhook scenario to validate the test framework. Additional tests will be added in separate PRs.

crimsonfaith91 commented 5 years ago

@enisoc Adding a brief documentation about running the tests will be helpful (e.g., make test).

crimsonfaith91 commented 5 years ago

/lgtm