Skip to content

Test coverage for the operator #8

@ncau

Description

@ncau

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:

  1. Check test mode applies
  2. Handles Openshift cluster type
  3. Handles incorrect cluster types
  4. Check RBAC manifests and config manifests are generated correctly
  5. Check data source configuration is valid
  6. Check a valid Kruize deployment manifest is generated

TODO (Integration test on a cluster):

  1. Successful pod creation of Kruize
  2. Successful pod creation of Kruize-ui
  3. Successful pod creation of Kruize-db
  4. Check for route creation and pod health
  5. Check Kruize can list data sources
  6. Check kruize endpoints can be accessed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions