operator-framework / helm-operator-plugins

Experimental refactoring of the operator-framework's helm operator
Apache License 2.0
49 stars 49 forks source link

Framework for testing helm and hybrid plugins in this repository #104

Open varshaprasad96 opened 3 years ago

varshaprasad96 commented 3 years ago

E2e tests currently in this repository: Currently, the repository has a make test command which patches the operator-sdk to include the hybrid plugin and scaffolds a sample project. It further runs the make build command and verifies if the scaffolded project builds. This is a GitHub action and runs for every PR.

Downside: The test is highly fragile and it is difficult the inject the latest commit information during build time. The current implementation only tests the scaffolding from the previous commit.

Proposed testing process: For e2e: We could build a helm operator binary which has helm and hybrid plugins included (ref). This could be used to scaffold a test project to make sure that the project builds successfully.

Unit tests for the plugin APIs: Similar to the tests written in java operator SDK (here), we can have tests to verify the plugin APIs.

This would make sure that the tests in this repository run independent of Operator SDK.

Follow Up: After the current make test target is refactored to use a separate binary, we can modify the hybrid scaffolding to inject the current commit in the project instead of hardcoding it.

theishshah commented 2 years ago

Happy to help get E2E testing up alongside Scorecard testing in CI (we can look into a basic set of custom tests for helm as well)