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
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ cache/

test-upgrade/

# must-gather
must-gather/oadp-must-gather
must-gather/must-gather/
must-gather/must-gather.local.*/
# must-gather e2e output
tests/e2e/must-gather/
29 changes: 24 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ endif
SETTINGS_TMP=/tmp/test-settings

.PHONY: test-e2e-setup
test-e2e-setup: login-required build-must-gather
test-e2e-setup: login-required
mkdir -p $(SETTINGS_TMP)
TMP_DIR=$(SETTINGS_TMP) \
OPENSHIFT_CI="$(OPENSHIFT_CI)" \
Expand All @@ -638,8 +638,30 @@ test-e2e-setup: login-required build-must-gather
BSL_AWS_PROFILE="$(BSL_AWS_PROFILE)" \
/bin/bash "tests/e2e/scripts/$(CLUSTER_TYPE)_settings.sh"

TTL_DURATION ?= 1h
MUST_GATHER_REPO ?=
MUST_GATHER_BRANCH ?= oadp-1.4
ifneq ($(MUST_GATHER_REPO),)
MUST_GATHER_IMAGE ?= ttl.sh/oadp-must-gather-$(MUST_GATHER_BRANCH)-$(GIT_REV):$(TTL_DURATION)
else
MUST_GATHER_IMAGE ?= quay.io/konveyor/oadp-must-gather:oadp-1.4
endif

.PHONY: build-must-gather
build-must-gather: ## Build must-gather image from GitHub source. Requires MUST_GATHER_REPO (e.g., openshift/oadp-must-gather). Uses MUST_GATHER_BRANCH (default: oadp-1.4).
ifeq ($(MUST_GATHER_REPO),)
$(error MUST_GATHER_REPO is required (e.g., openshift/oadp-must-gather))
endif
$(eval MUST_GATHER_TMP := $(shell mktemp -d))
git clone --depth=1 --branch $(MUST_GATHER_BRANCH) https://github.com/$(MUST_GATHER_REPO).git $(MUST_GATHER_TMP)
$(CONTAINER_TOOL) build --load -t $(MUST_GATHER_IMAGE) -f $(MUST_GATHER_TMP)/Dockerfile $(MUST_GATHER_TMP)
$(CONTAINER_TOOL) push $(MUST_GATHER_IMAGE)
rm -rf $(MUST_GATHER_TMP)
@echo "Must-gather image built and pushed: $(MUST_GATHER_IMAGE)"

.PHONY: test-e2e
test-e2e: test-e2e-setup install-ginkgo
test-e2e: test-e2e-setup install-ginkgo $(if $(MUST_GATHER_REPO),build-must-gather)
MUST_GATHER_IMAGE=$(MUST_GATHER_IMAGE) \
ginkgo run -mod=mod tests/e2e/ -- \
-settings=$(SETTINGS_TMP)/oadpcreds \
-provider=$(CLUSTER_TYPE) \
Expand Down Expand Up @@ -751,6 +773,3 @@ $(YQ): $(LOCALBIN)
fi
@ln -sf "$(LOCALBIN)/$(BRANCH_VERSION)/yq" "$(LOCALBIN)/yq"

.PHONY: build-must-gather
build-must-gather: check-go ## Build OADP Must-gather binary must-gather/oadp-must-gather
cd must-gather && go build -mod=mod -a -o oadp-must-gather cmd/main.go
3 changes: 3 additions & 0 deletions docs/developer/testing/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ To get started, you need to provide the following **required** environment varia
| `OADP_TEST_NAMESPACE` | The namespace where OADP operator is installed | `openshift-adp` | false |
| `OPENSHIFT_CI` | Disable colored output from tests suite run | `true` | false |
| `TEST_VIRT` | Exclusively run Virtual Machine backup/restore testing | `false` | false |
| `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 |

The expected format for `OADP_CRED_FILE` and `CI_CRED_FILE` files is:
```
Expand Down
41 changes: 0 additions & 41 deletions must-gather/Dockerfile

This file was deleted.

67 changes: 0 additions & 67 deletions must-gather/Dockerfile.oadp

This file was deleted.

107 changes: 0 additions & 107 deletions must-gather/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions must-gather/cmd/main.go

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_1h

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_1h_essential

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_24h

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_24h_essential

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_6h

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_6h_essential

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_72h

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_72h_essential

This file was deleted.

26 changes: 0 additions & 26 deletions must-gather/deprecated/gather_all

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_all_essential

This file was deleted.

5 changes: 0 additions & 5 deletions must-gather/deprecated/gather_metrics_dump

This file was deleted.

Loading