Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ OC_CLI = $(shell which oc)
TEST_VIRT ?= false
TEST_HCP ?= false
TEST_UPGRADE ?= false
TEST_CLI ?= false
SKIP_MUST_GATHER ?= false

# TOOL VERSIONS
# All version-related variables are defined here for easy maintenance
Expand Down Expand Up @@ -615,6 +617,11 @@ ifeq ($(TEST_HCP),true)
else
TEST_FILTER += && (! hcp)
endif
ifeq ($(TEST_CLI),true)
TEST_FILTER += && (cli)
else
TEST_FILTER += && (! cli)
endif
SETTINGS_TMP=/tmp/test-settings

.PHONY: test-e2e-setup
Expand Down
22 changes: 18 additions & 4 deletions build/ci-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ WORKDIR /go/src/github.com/openshift/oadp-operator
COPY ./ .

RUN go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
RUN go mod download
RUN chmod -R 777 ./
RUN chmod -R 777 $(go env GOPATH)
RUN mkdir -p $(go env GOCACHE) && chmod -R 777 $(go env GOCACHE)

# Clone and install oadp-cli pinned to oadp-1.4
RUN git clone --depth=1 --branch oadp-1.4 https://github.com/migtools/oadp-cli.git /tmp/oadp-cli && \
cd /tmp/oadp-cli && \
make build && \
cp kubectl-oadp /usr/local/bin/ && \
chmod +x /usr/local/bin/kubectl-oadp && \
rm -rf /tmp/oadp-cli

# Install kubectl (multi-arch)
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/

RUN go mod download && \
mkdir -p $(go env GOCACHE) && \
chmod -R 777 ./ $(go env GOCACHE) $(go env GOPATH)
3 changes: 3 additions & 0 deletions docs/developer/testing/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ To get started, you need to provide the following **required** environment varia
| `MUST_GATHER_IMAGE` | Container image to use for must-gather collection via `oc adm must-gather` | `quay.io/konveyor/oadp-must-gather:oadp-1.4` | false |
| `MUST_GATHER_REPO` | GitHub repo (e.g., `openshift/oadp-must-gather`) to build must-gather from source. Sets `MUST_GATHER_IMAGE` to a ttl.sh image automatically | - | false |
| `MUST_GATHER_BRANCH` | Branch to use when building from `MUST_GATHER_REPO` | `oadp-1.4` | false |
| `TEST_UPGRADE` | Exclusively run upgrade tests. Need to first run `make catalog-test-upgrade`, if testing non production operator | `false` | false |
| `TEST_CLI` | Exclusively run CLI-based backup/restore testing | `false` | false |
| `SKIP_MUST_GATHER` | must-gather is compiled locally in the Makefile, may cause issue if local and cluster arch do not match| `false` | false |

The expected format for `OADP_CRED_FILE` and `CI_CRED_FILE` files is:
```
Expand Down
Loading
Loading