Uploaded image for project: 'Operator Ecosystem'
  1. Operator Ecosystem
  2. OPECO-1943

Add e2e and unit tests for plugin APIs

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • OSDK Sprint 64

      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.

              vnarsing@redhat.com Varsha Prasad Narsing
              vnarsing@redhat.com Varsha Prasad Narsing
              Jia Fan Jia Fan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: