Skip to content

Commit

Permalink
feat: Added zpa app connector assistant schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
willguibr committed Dec 20, 2023
1 parent 843ebe0 commit df9056c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/reuse-zdx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ jobs:
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }}
- name: Set Credentials
- name: Run tests with retry
uses: nick-invision/retry@v2
with:
max_attempts: 1
timeout_minutes: 10 # Adjust as needed
command: |
make test:integration:zdx
env:
ZDX_API_KEY_ID: ${{ secrets.ZDX_API_KEY_ID }}
ZDX_API_SECRET: ${{ secrets.ZDX_API_SECRET }}
run: |
go test ./zdx/... -race -coverprofile zdxcoverage.txt -covermode=atomic -v -parallel 30 -timeout 120m
go tool cover -func zdxcoverage.txt | grep total:

12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,18 @@ jobs:
ZCON_CLOUD: ${{ secrets.ZCON_CLOUD }}
ZSCALER_SDK_TEST_SWEEP: ${{ secrets.ZSCALER_SDK_TEST_SWEEP }}

zdx-tenant01:
zdx-zs2:
uses: ./.github/workflows/reuse-zdx-tests.yml
with:
environment: ZDX_TENANT01
environment: ZDX_ZS2
secrets:
ZDX_API_KEY_ID: ${{ secrets.ZDX_API_KEY_ID }}
ZDX_API_SECRET: ${{ secrets.ZDX_API_SECRET }}

zdx-zs3:
uses: ./.github/workflows/reuse-zdx-tests.yml
with:
environment: ZDX_ZS3
secrets:
ZDX_API_KEY_ID: ${{ secrets.ZDX_API_KEY_ID }}
ZDX_API_SECRET: ${{ secrets.ZDX_API_SECRET }}
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ help:
@echo "$(COLOR_WARNING)test$(COLOR_NONE)"
@echo "$(COLOR_OK) test:all Run all tests$(COLOR_NONE)"
@echo "$(COLOR_OK) test:zcon Run only zcon integration tests$(COLOR_NONE)"
@echo "$(COLOR_OK) test:zdx Run only zdx integration tests$(COLOR_NONE)"
@echo "$(COLOR_OK) test:zia Run only zpa integration tests$(COLOR_NONE)"
@echo "$(COLOR_OK) test:zpa Run only zpa integration tests$(COLOR_NONE)"
@echo "$(COLOR_OK) test:unit Run only unit tests$(COLOR_NONE)"
Expand All @@ -39,6 +40,8 @@ test:

test\:all:
@echo "$(COLOR_ZSCALER)Running all tests...$(COLOR_NONE)"
@make test:zcon
@make test:zdx
@make test:zpa
@make test:zia

Expand All @@ -48,6 +51,12 @@ test\:integration\:zcon:
go tool cover -func zconcoverage.txt | grep total:
rm -rf zconcoverage.txt

test\:integration\:zdx:
@echo "$(COLOR_ZSCALER)Running zcon integration tests...$(COLOR_NONE)"
go test -failfast -race ./zdx/... -race -coverprofile zdxcoverage.txt -covermode=atomic -v -parallel 4 -timeout 30m
go tool cover -func zdxcoverage.txt | grep total:
rm -rf zdxcoverage.txt

test\:integration\:zpa:
@echo "$(COLOR_ZSCALER)Running zpa integration tests...$(COLOR_NONE)"
go test -failfast -race ./zpa/... -race -coverprofile zpacoverage.txt -covermode=atomic -v -parallel 20 -timeout 120m
Expand All @@ -68,6 +77,10 @@ test\:unit\zcon:
@echo "$(COLOR_OK)Running unit tests...$(COLOR_NONE)"
go test -failfast -race ./tests/unit/zcon -test.v

test\:unit\zdx:
@echo "$(COLOR_OK)Running unit tests...$(COLOR_NONE)"
go test -failfast -race ./tests/unit/zdx -test.v

test\:unit\:zia:
@echo "$(COLOR_OK)Running unit tests...$(COLOR_NONE)"
go test -failfast -race ./tests/unit/zia -test.v
Expand All @@ -79,6 +92,7 @@ test\:unit\:zpa:
test\:unit\all:
@echo "$(COLOR_OK)Running unit tests...$(COLOR_NONE)"
go test -race ./tests/unit/zcon -test.v
go test -race ./tests/unit/zdx -test.v
go test -race ./tests/unit/zia -test.v
go test -race ./tests/unit/zpa -test.v

Expand Down

0 comments on commit df9056c

Please sign in to comment.