Skip to content

Commit 5000c2e

Browse files
Backport cli e2e 1.3 (#2300)
* Backport cli e2e 1.3 * fix: replace undefined velero Finalizing phase constants with string literals for oadp-1.3 compatibility * Fix errors * Fixed errors again
1 parent 0a6d819 commit 5000c2e

14 files changed

Lines changed: 1508 additions & 29 deletions

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ARTIFACT_DIR ?= /tmp
3131
OC_CLI = $(shell which oc)
3232
TEST_VIRT ?= false
3333
TEST_UPGRADE ?= false
34+
TEST_CLI ?= false
3435

3536
ifdef CLI_DIR
3637
OC_CLI = ${CLI_DIR}/oc
@@ -494,6 +495,11 @@ ifeq ($(TEST_UPGRADE),true)
494495
else
495496
TEST_FILTER += && (! upgrade)
496497
endif
498+
ifeq ($(TEST_CLI),true)
499+
TEST_FILTER += && (cli)
500+
else
501+
TEST_FILTER += && (! cli)
502+
endif
497503
SETTINGS_TMP=/tmp/test-settings
498504

499505
.PHONY: test-e2e-setup

build/ci-Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ WORKDIR /go/src/github.com/openshift/oadp-operator
66
COPY ./ .
77

88
RUN go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
9+
10+
# Clone and install oadp-cli pinned to oadp-1.3
11+
RUN git clone --depth=1 --branch oadp-1.3 https://github.com/migtools/oadp-cli.git /tmp/oadp-cli && \
12+
cd /tmp/oadp-cli && \
13+
make build && \
14+
cp kubectl-oadp /usr/local/bin/ && \
15+
chmod +x /usr/local/bin/kubectl-oadp && \
16+
rm -rf /tmp/oadp-cli
17+
18+
# Install kubectl (multi-arch)
19+
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
20+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" && \
21+
chmod +x kubectl && \
22+
mv kubectl /usr/local/bin/
23+
924
RUN go mod download
1025
RUN chmod -R 777 ./
1126
RUN chmod -R 777 $(go env GOPATH)

docs/developer/testing/TESTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ To get started, you need to provide the following **required** environment varia
2424
| `MUST_GATHER_IMAGE` | Container image to use for must-gather collection via `oc adm must-gather` | `quay.io/konveyor/oadp-must-gather:oadp-1.3` | false |
2525
| `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 |
2626
| `MUST_GATHER_BRANCH` | Branch to use when building from `MUST_GATHER_REPO` | `oadp-1.3` | false |
27+
| `TEST_CLI` | Exclusively run CLI-based backup/restore testing | `false` | false |
2728

2829
The expected format for `OADP_CRED_FILE` and `CI_CRED_FILE` files is:
2930
```

0 commit comments

Comments
 (0)