Skip to content

Commit

Permalink
Refactor & simplify functest make target & hack script
Browse files Browse the repository at this point in the history
Signed-off-by: Malay Kumar Parida <[email protected]>
  • Loading branch information
malayparida2000 committed Sep 26, 2023
1 parent 344766e commit e413751
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ cluster-clean:
@echo "Removing ocs install from cluster"
hack/cluster-clean.sh

build-functest:
@echo "Building functional tests"
hack/build-functest.sh

functest: build-functest
functest:
@echo "Running ocs developer functional test suite"
hack/functest.sh $(ARGS)

Expand Down
18 changes: 0 additions & 18 deletions hack/build-functest.sh

This file was deleted.

15 changes: 15 additions & 0 deletions hack/functest.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#!/usr/bin/env bash

set -e

source hack/common.sh

mkdir -p "${LOCALBIN}"

if ! [ -x "$GINKGO" ]; then
echo "Installing GINKGO binary at $GINKGO"
GOBIN=${LOCALBIN} go install github.com/onsi/ginkgo/v2/ginkgo
else
echo "GINKO binary found at $GINKGO"
fi

"${GINKGO}" build --ldflags "${LDFLAGS}" "functests/${GINKGO_TEST_SUITE}/"

mv "functests/${GINKGO_TEST_SUITE}/${GINKGO_TEST_SUITE}.test" "${LOCALBIN}/${GINKGO_TEST_SUITE}_tests"

"${LOCALBIN}/${GINKGO_TEST_SUITE}_tests" -ginkgo.v \
--ocs-catalog-image="${FILE_BASED_CATALOG_FULL_IMAGE_NAME}" \
--ocs-subscription-channel="${OCS_SUBSCRIPTION_CHANNEL}" \
Expand Down

0 comments on commit e413751

Please sign in to comment.