Skip to content

Commit

Permalink
Add make command for integration tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
  • Loading branch information
HumairAK committed Oct 19, 2023
1 parent bff1c3c commit a4bdb56
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/kind-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
NAMESPACE: ${{ env.DSPA_NAMESPACE }}
DSPA_NAME: ${{ env.DSPA_NAME }}
run: |
go run github.com/onsi/ginkgo/v2/ginkgo --tags=test_integration -- -kubeconfig=$HOME/.kube/config -k8sApiServerHost=$(oc whoami --show-server) -DSPANamespace=${{ env.DSPA_NAMESPACE }} -DSPAPath=resources/dspa-lite.yaml -ginkgo.v
make integrationtest K8SAPISERVERHOST=$(oc whoami --show-server) DSPANAMESPACE=dspa
- name: Clean up
run: |
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ ENVTEST_K8S_VERSION = 1.25.0
# Namespace to deploy the operator
OPERATOR_NS ?= odh-applications

# Integration Test ENVvars
KUBECONFIGPATH ?= $(HOME)/.kube/config
K8SAPISERVERHOST ?= http://localhost:6443
DSPANAMESPACE ?= default
DSPAPATH ?= resources/dspa-lite.yaml

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
Expand Down Expand Up @@ -115,6 +121,11 @@ unittest: manifests generate fmt vet envtest ## Run tests.
functest: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... --tags=test_functional -coverprofile cover.out

.PHONY: integrationtest
integrationtest: ## Run integration tests
cd tests && \
go run github.com/onsi/ginkgo/v2/ginkgo --tags=test_integration -- -kubeconfig=${KUBECONFIGPATH} -k8sApiServerHost=${K8SAPISERVERHOST} -DSPANamespace=${DSPANAMESPACE} -DSPAPath=${DSPAPATH} -ginkgo.v

##@ Build

.PHONY: build
Expand Down

0 comments on commit a4bdb56

Please sign in to comment.