Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoutp committed Mar 19, 2018
1 parent c718145 commit 3ca48a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,7 @@ ifneq ($(DEPLOYMENTNAMESPACE), default)
endif
kubectl apply -f $(MANIFESTPATH)
$(ROOTDIR)/scripts/kube_create_storage.sh $(DEPLOYMENTNAMESPACE)
kubectl --namespace $(DEPLOYMENTNAMESPACE) \
run arangodb-operator-test -i --rm --quiet --restart=Never \
--image=$(shell docker inspect $(TESTIMAGE) '--format={{index .RepoDigests 0}}') \
--env="ENTERPRISEIMAGE=$(ENTERPRISEIMAGE)" \
--env="TEST_NAMESPACE=$(DEPLOYMENTNAMESPACE)" \
-- \
-test.v -test.timeout $(TESTTIMEOUT) $(TESTLENGTHOPTIONS)
$(ROOTDIR)/scripts/kube_run_tests.sh $(DEPLOYMENTNAMESPACE) $(TESTIMAGE) "$(ENTERPRISEIMAGE)" $(TESTTIMEOUT) $(TESTLENGTHOPTIONS)
ifneq ($(DEPLOYMENTNAMESPACE), default)
kubectl delete namespace $(DEPLOYMENTNAMESPACE) --ignore-not-found --now
endif
Expand Down
19 changes: 19 additions & 0 deletions scripts/kube_run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Run kubectl run to run the integration tests.

DEPLOYMENTNAMESPACE=$1
TESTIMAGE=$2
ENTERPRISEIMAGE=$3
TESTTIMEOUT=$4
TESTLENGTHOPTIONS=$5

IMAGEID=$(docker inspect ${TESTIMAGE} '--format={{index .RepoDigests 0}}')

kubectl --namespace ${DEPLOYMENTNAMESPACE} \
run arangodb-operator-test -i --rm --quiet --restart=Never \
--image=${IMAGEID} \
--env="ENTERPRISEIMAGE=${ENTERPRISEIMAGE}" \
--env="TEST_NAMESPACE=${DEPLOYMENTNAMESPACE}" \
-- \
-test.v -test.timeout $TESTTIMEOUT $TESTLENGTHOPTIONS

0 comments on commit 3ca48a7

Please sign in to comment.