Skip to content

Commit

Permalink
Updates to run caas acceptance tests in CI (#42)
Browse files Browse the repository at this point in the history
* Updates to run caas acceptance tests in CI

Signed-off-by: CharlieBlain <[email protected]>

* Removing ACC_TEST_SERVICES var in Makefile

Signed-off-by: CharlieBlain <[email protected]>

Co-authored-by: CharlieBlain <[email protected]>
  • Loading branch information
CharlieBlain and CharlieBlain authored Jun 16, 2022
1 parent 24365c3 commit 3afaa9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ env:
HPEGL_TENANT_ID: ${{ secrets.HPEGL_TENANT_ID }}
HPEGL_USER_SECRET: ${{ secrets.HPEGL_USER_SECRET }}
HPEGL_USER_ID: ${{ secrets.HPEGL_USER_ID }}
HPEGL_VMAAS_LOCATION: ${{ secrets.HPEGL_VMAAS_LOCATION }}
HPEGL_VMAAS_SPACE_NAME: ${{ secrets.HPEGL_VMAAS_SPACE_NAME }}
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
HPEGL_API_VENDED_SERVICE_CLIENT: true
jobs:
ci:
runs-on: ubuntu-20.04
Expand Down
23 changes: 11 additions & 12 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ DEPEND_REPO=HewlettPackard/hpegl-vmaas-terraform-resources hewlettpackard/hpegl-

prefix=hpegl-
suffix=-terraform-resources
ACC_TEST_SERVICES=vmaas
TESTCASE_DIRS=data-sources resources

default: build
Expand Down Expand Up @@ -66,24 +65,24 @@ accframework: vendor

# Download acceptance tests
# build config files
for f in $(ACC_TEST_SERVICES); do \
if [ -d "internal/acceptance/$${f}" ] ; then \
rm -rf ./internal/acceptance/$${f} ; \
fi ; \
for f in containers vmaas ; do \
if [ -d "internal/acceptance/$${f}" ] ; then \
rm -rf ./internal/acceptance/$${f} ; \
fi ; \
mkdir ./internal/acceptance/$${f} ; \
if [ -d vendor/github.com/HewlettPackard/$(prefix)$${f}$(suffix)/internal/acceptance_test ] ; then \
cp -r vendor/github.com/HewlettPackard/$(prefix)$${f}$(suffix)/internal/acceptance_test ./internal/acceptance/$${f} ; \
cp -r vendor/github.com/HewlettPackard/$(prefix)$${f}$(suffix)/acc-testcases ./internal/acceptance/$${f} ; \
cp -r vendor/github.com/HewlettPackard/$(prefix)$${f}$(suffix)/internal/acceptance_test/* ./internal/acceptance/$${f} ; \
fi ; \
if [ $${f} = "vmaas" ]; then\
cp -r vendor/github.com/HewlettPackard/$(prefix)$${f}$(suffix)/acc-testcases ./internal/acceptance/$${f} ; \
fi ; \
rm ./internal/acceptance/$${f}/provider_test.go ; \
cp ./internal/acceptance/acceptance-utils/provider_test.go ./internal/acceptance/$${f} ; \
go mod tidy ; \
go mod vendor ; \
cp ./internal/acceptance/acceptance-utils/provider_test.go ./internal/acceptance/$${f} ; \
done

.PHONY: accframework

acceptance: accframework
-for f in $(ACC_TEST_SERVICES); do \
-for f in vmaas containers ; do \
TF_ACC_TEST_PATH=$(shell pwd)/internal/acceptance/vmaas/acc-testcases TF_ACC=true go test -v -timeout=9000s -cover ./internal/acceptance/$$f ; \
# remove service tests ; \
rm -rf ./internal/acceptance/$$f ; \
Expand Down

0 comments on commit 3afaa9c

Please sign in to comment.