Adding the initial test coverage for the operator. The tests will cover the none cluster dependent side of operations, these should eventually be tested through integration tests on an existing cluster and wont be covered in the operator testing code itself.
To run the existing tests use go test -v ./internal/controller or just make test for the simpler view.
Currently I'm going to add a test mode although this may not be the approach we want down the line.
Tests:
- Check test mode applies
- Handles Openshift cluster type
- Handles incorrect cluster types
- Check RBAC manifests and config manifests are generated correctly
- Check data source configuration is valid
- Check a valid Kruize deployment manifest is generated
TODO (Integration test on a cluster):
- Successful pod creation of Kruize
- Successful pod creation of Kruize-ui
- Successful pod creation of Kruize-db
- Check for route creation and pod health
- Check Kruize can list data sources
- Check kruize endpoints can be accessed
Adding the initial test coverage for the operator. The tests will cover the none cluster dependent side of operations, these should eventually be tested through integration tests on an existing cluster and wont be covered in the operator testing code itself.
To run the existing tests use go test -v ./internal/controller or just make test for the simpler view.
Currently I'm going to add a test mode although this may not be the approach we want down the line.
Tests:
TODO (Integration test on a cluster):