Uploaded image for project: 'Knative Serving'
  1. Knative Serving
  2. SRVKS-526

Cleanup our serverless-operator end-to-end tests

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • None
    • Serverless Sprint 183

      These tests have grown quite a bit and have become hard to manage. I think we should:

      1. Separate the operator setup tests and the Knative Serving behavior tests.
      2. Reorganize the code for Knative Serving behavior tests in separate files to make them more manageable.
      3. Make use of upstream helpers in the Knative Serving behavior tests. There's no need to write our own helpers to generate services and such.
      4. Make sure that tests properly clean up after each other.

      One of the biggest pain points for me is that I can't run individual tests against a presetup cluster without running the whole ordeal. The changes needed should be fairly contained and straightforward, we can likely ship this in multiple iterations rather than as a big bang.

      Concrete things I'd see us doing:
      1. Strip the operator tests (test/e2e/knative_serving_tests.go) down to just deploying the operator, checking deployments and removing it again. The disabled proxy test can stay as well.
      2. Move all other tests to separate files where appropriate and into a different directory to make them explicitly callable. Their "go test" command should be in test/e2e-test.sh and come after the "ensure_serverless_installed" call, i.e.: They shall assume that the operator is installed and that KnativeServing is installed too.
      3. Update upstream dependencies where necessary and remove things out of test/service.go and the v1alpha1 folder where appropriate.
      4. In the newly created folder with separate tests, all those tests should use upstream helpers (i.e. Teardown) to clean up after themselves.

              hranjan Himanshu Ranjan (Inactive)
              markusthoemmes Markus Thömmes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: