Skip to content

Commit

Permalink
Fix tests (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura authored Feb 26, 2024
1 parent c1f494d commit 3079c49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ OPERATOR_ROOT=./components/operator
include ${PROJECT_ROOT}/hack/tools/help.Makefile

##@ Installation
.PHONY: install-serverless-main
install-serverless-main: ## Install serverless with operator using default serverless cr
make -C ${OPERATOR_ROOT} deploy apply-default-serverless-cr check-serverless-installation

.PHONY: install-latest-serverless
.PHONY: install-serverless-latest-release
install-serverless-latest-release:
kubectl create namespace kyma-system || true
kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/latest/download/serverless-operator.yaml
kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/latest/download/default-serverless-cr.yaml -n kyma-system
@make -C ${OPERATOR_ROOT} verify-serverless
make -C ${OPERATOR_ROOT} verify-serverless

.PHONY: remove-serverless
remove-serverless:
make -C ${OPERATOR_ROOT} remove-serverless undeploy
make -C ${OPERATOR_ROOT} remove-serverless undeploy
12 changes: 6 additions & 6 deletions hack/ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# local variables
PROJECT_ROOT = ../..
PROJECT_ROOT=../..
TEST_ROOT=${PROJECT_ROOT}/tests/serverless

include ${PROJECT_ROOT}/hack/tools/help.Makefile
Expand All @@ -12,15 +12,15 @@ integration-test: ## Run integration tests on self-prepared k3d cluster.

.PHONY: gardener-integration-test
gardener-integration-test: ## Provision gardener cluster and run integration test on it.
@make provision-gardener && make -c ${OPERATOR_ROOT} install-serverless-main &&
@make integration-test \
make provision-gardener && make -c ${OPERATOR_ROOT} install-serverless-main && \
make integration-test \
deprovision-gardener || \
(make deprovision-gardener && false)

.PHONY: integration-test-on-cluster
integration-test-on-cluster: ## Install serverless with default serverless-cr, run integration tests and remove serverless-cr
make -C ${PROJECT_ROOT} install-serverless-main
@make integration-test
make integration-test
make -C ${PROJECT_ROOT} remove-serverless

.PHONY: git-auth-test-on-cluster
Expand All @@ -32,6 +32,6 @@ git-auth-test-on-cluster: # Install serverless with default serverless-cr, run g
.PHONY: upgrade-test
upgrade-test: ## Installs Serverless from latest, upgrades to version specified in IMG and run integration tests
upgrade-test:
make -C ${PROJECT ROOT} install-serverless-latest-release install-serverless-main
@make integration-test
make -C ${PROJECT_ROOT} install-serverless-latest-release install-serverless-main
make integration-test
make -C ${PROJECT_ROOT} remove-serverless

0 comments on commit 3079c49

Please sign in to comment.