Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 5 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,44 +152,25 @@ test: manifests generate fmt vet ## Run unit tests.


.PHONY: e2e-tests-ginkgo
e2e-tests-ginkgo: e2e-tests-sequential-ginkgo e2e-tests-parallel-ginkgo ## Runs kuttl e2e sequential and parallel tests
e2e-tests-ginkgo: e2e-tests-sequential-ginkgo e2e-tests-parallel-ginkgo ## Runs Ginkgo e2e sequential and parallel tests

.PHONY: e2e-tests-sequential-ginkgo
e2e-tests-sequential-ginkgo: ginkgo ## Runs kuttl e2e sequential tests
e2e-tests-sequential-ginkgo: ginkgo ## Runs Ginkgo e2e sequential tests
@echo "Running GitOps Operator sequential Ginkgo E2E tests..."
$(GINKGO_CLI) -v --trace --timeout 240m -r ./test/openshift/e2e/ginkgo/sequential

.PHONY: e2e-tests-parallel-ginkgo ## Runs kuttl e2e parallel tests, (Defaults to 5 runs at a time)
.PHONY: e2e-tests-parallel-ginkgo ## Runs Ginkgo e2e parallel tests, (Defaults to 5 runs at a time)
e2e-tests-parallel-ginkgo: ginkgo
@echo "Running GitOps Operator parallel Ginkgo E2E tests..."
$(GINKGO_CLI) -p -v -procs=5 --trace --timeout 60m -r ./test/openshift/e2e/ginkgo/parallel

.PHONY: e2e-tests-sequential
e2e-tests-sequential:
CI=prow make e2e-tests-sequential-ginkgo ## Runs kuttl e2e sequentail tests
# @echo "Running GitOps Operator sequential E2E tests..."
# . ./scripts/run-kuttl-tests.sh sequential
CI=prow make e2e-tests-sequential-ginkgo ## Runs Ginkgo e2e sequential tests

.PHONY: e2e-tests-parallel ## Runs kuttl e2e parallel tests, (Defaults to 5 runs at a time)
.PHONY: e2e-tests-parallel ## Runs Ginkgo e2e parallel tests, (Defaults to 5 runs at a time)
e2e-tests-parallel:
CI=prow make e2e-tests-parallel-ginkgo
# @echo "Running GitOps Operator parallel E2E tests..."
# . ./scripts/run-kuttl-tests.sh parallel

.PHONY: e2e-non-olm-tests-sequential
e2e-non-olm-tests-sequential: ## Runs kuttl non-olm e2e sequentail tests
@echo "Running Non-OLM GitOps Operator sequential E2E tests..."
. ./hack/scripts/run-non-olm-kuttl-test.sh -t sequential

.PHONY: e2e-non-olm-tests-parallel ## Runs kuttl non-olm e2e parallel tests, (Defaults to 5 runs at a time)
e2e-non-olm-tests-parallel:
@echo "Running Non-OLM GitOps Operator parallel E2E tests..."
. ./hack/scripts/run-non-olm-kuttl-test.sh -t parallel

.PHONY: e2e-non-olm-tests-all ## Runs kuttl non-olm e2e parallel tests, (Defaults to 5 runs at a time)
e2e-non-olm-tests-all:
@echo "Running Non-OLM GitOps Operator E2E tests..."
. ./hack/scripts/run-non-olm-kuttl-test.sh -t all

##@ Build

Expand Down
23 changes: 9 additions & 14 deletions hack/scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
### Non OLM based operator e2e kuttl test
### Non-OLM operator: Ginkgo E2E tests

`run-non-olm-kuttl-test.sh` is a bash script utility, that can be used to run the end to end test for Openshift GitOps Operator without using the `Operator Lifecycle Manager (OLM)`.
When the operator is installed without OLM (for example via a plain `Deployment` in `openshift-gitops-operator`), run the OpenShift E2E suite with `NON_OLM=true` so tests that require a `Subscription` or productized images are skipped.

### Usage
From the repository root:

The `run-non-olm-kuttl-test.sh` script needs to be run with argument specifying the test suite to be run with .
```bash
NON_OLM=true make e2e-tests-sequential-ginkgo
# and/or
NON_OLM=true make e2e-tests-parallel-ginkgo
```

run-non-olm-kuttl-test.sh [ -t sequential|parallel|all ]

Example

`./run-non-olm-kuttl-test.sh -t parallel` will run the entire parallel test suite. By default it will run all the tests.

The directories that are not needed for the nightly operator are excluded before running the tests.
If you want to add more excluded tests, you can do so by using an environment variable called `EXCLUDED_TESTS` like so,

`export EXCLUDED_TESTS="1-031_validate_toolchain 1-085_validate_dynamic_plugin_installation 1-038_validate_productized_images"`
See `test/openshift/e2e/README.md` for full options (`LOCAL_RUN`, `SKIP_HA_TESTS`, and so on).
97 changes: 0 additions & 97 deletions hack/scripts/run-non-olm-kuttl-test.sh

This file was deleted.

5 changes: 0 additions & 5 deletions openshift-ci/build-root/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
FROM quay.io/devtools_gitops/go-toolset:1.25.5
USER root

ARG KUBECTL_KUTTL_VERSION=0.12.1
ARG OPERATOR_SDK_VERSION=1.35.0

# Install kubectl tool which is used in e2e-tests
RUN curl -sSL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x /usr/local/bin/kubectl

# Install kubectl-kuttl tool which is used in e2e-tests
RUN curl -sSL -o /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v${KUBECTL_KUTTL_VERSION}/kubectl-kuttl_${KUBECTL_KUTTL_VERSION}_linux_x86_64 && \
chmod +x /usr/local/bin/kubectl-kuttl

# Install argocd cli tool which is used in e2e-tests
RUN curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && \
chmod +x /usr/local/bin/argocd
Expand Down
2 changes: 1 addition & 1 deletion scripts/openshiftci-olm-kuttl-tests.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if [ "$E2E_SKIP_OPERATOR_INSTALLATION" = false ]; then
install_operator_resources
fi

header "Running kuttl e2e tests"
header "Running Ginkgo e2e tests"
make e2e-tests-sequential || failed=1

if [[ "$IGNORE_PARALLEL_TESTS" = "false" ]]; then
Expand Down
135 changes: 0 additions & 135 deletions scripts/run-kuttl-tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/examples/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains examples for testing gitops operator.

We used to use some of our personal github profiles in Kuttl testing repository as a repoURL. We decided to centralized location for storing them in gitops-operator repo and eliminate the dependency of personal account of a developer or QE.
We used to use some of our personal GitHub profiles in older E2E fixtures as a `repoURL`. We centralized these examples in the gitops-operator repo to avoid depending on a developer or QE personal account.

## How these examples are used?

Expand Down
4 changes: 2 additions & 2 deletions test/openshift/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can skip non-local-supported tests by setting `LOCAL_RUN=true`:
```bash
LOCAL_RUN=true make e2e-tests-sequential-ginkgo
# and/or
LOCAL_RUN=true make e2e-tests-sequential-parallel
LOCAL_RUN=true make e2e-tests-parallel-ginkgo
```


Expand Down Expand Up @@ -224,7 +224,7 @@ defer cleanupFunc()
### `01-create-or-update-resource.yaml`

Example:
In kuttl, this would create (or modify an existing) `ArgoCD` CR to have dex sso provider using openShiftOAuth.
In a Kuttl test, this would create (or modify an existing) `ArgoCD` CR to use the Dex SSO provider with `openShiftOAuth`.
```yaml
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
Expand Down

This file was deleted.

Loading
Loading