argoproj-labs / argo-rollouts-manager

Kubernetes Operator for Argo Rollouts controller.
https://argo-rollouts-manager.readthedocs.io/en/latest/
Apache License 2.0
93 stars 304 forks source link

Create new (Ginkgo-based) E2E tests to verify existing functionality #26

Closed jgwest closed 7 months ago

jgwest commented 8 months ago

I've contributed initial E2E test fixtures, and E2E tests, as part of https://github.com/argoproj-labs/argo-rollouts-manager/pull/19.

However, all I did was port the existing kuttl tests to Ginkgo.

As part of this current PR, we should add additional E2E tests that more thoroughly test the functionality that is already implemented in this repository.

NOTE: As of this writing, we only support Namespace-scoped Argo Rollouts installs. Thus the tests only need to verify that rollouts can be installed into a single Namespace.

My initial brainstorm was that we should at least do this as part of our E2E tests:

1) verify that the expected resources are expected

2) verify that creation of rollouts manager with args, env vars, work as expected

The Rollouts CR also supports env, extraCommand args, custom image, version. We should make sure these are set as expected.

apiVersion: argoproj.io/v1alpha1
kind: RolloutManager
metadata:
  name: argo-rollout
  labels:
    example: with-properties
spec:
  env:
   - name: "foo"
      value: "bar"
  extraCommandArgs:
   - --foo
   - bar
  image: "quay.io/random/my-rollout-image"
  version: "sha256:...."

3) Verify that modification of args, env vars, etc, works as expected

The ev, extraCommand args, custom image, version can all be modified. We should ensure that when they are modified on an existing RollutManager, that the change is made correctly to the resources.

4) Verify that deletion of rolloutsmanager deletes any old resources

Likewise, verify that when a RolloutsManager is deleted that all the expected resources are deleted.

5) Anything else you can think of?

Issue Criteria:

jgwest commented 8 months ago

Red Hat JIRA Tracker: https://issues.redhat.com/browse/GITOPS-3912