-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added ZIA SSL Inspection Rules Endpoint (#295)
* feat: Added ZIA SSL Inspection Rules Endpoint
- Loading branch information
Showing
11 changed files
with
831 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: ZIA Test | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
merge_group: | ||
types: [checks_requested] | ||
push: | ||
branches: | ||
- master | ||
|
||
# For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.), | ||
# we recommend testing at a regular interval not necessarily tied to code changes. This will | ||
# ensure you are alerted to something breaking due to an API change, even if the code did not | ||
# change. | ||
|
||
schedule: | ||
- cron: '0 11 * * 1-5' # UTC | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zia-zsbeta-tests: | ||
environment: ZIA_ZSBETA | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goVersion: ["1.22"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.goVersion }} | ||
|
||
- name: Clean existing Go modules | ||
run: go clean -modcache | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Set Go env | ||
run: | | ||
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | ||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: go mod download | ||
|
||
- name: Run tests with retry on Ubuntu | ||
uses: nick-fields/retry@v2 | ||
with: | ||
max_attempts: 3 | ||
timeout_minutes: 20 # Adjust as needed | ||
command: | | ||
make sweep:zia | ||
make test:integration:zia | ||
env: | ||
ZSCALER_CLIENT_ID: ${{ secrets.ZSCALER_CLIENT_ID }} | ||
ZSCALER_CLIENT_SECRET: ${{ secrets.ZSCALER_CLIENT_SECRET }} | ||
ZSCALER_VANITY_DOMAIN: ${{ secrets.ZSCALER_VANITY_DOMAIN }} | ||
ZSCALER_CLOUD: ${{ secrets.ZSCALER_CLOUD }} | ||
# ZSCALER_SDK_LOG: ${{ secrets.ZSCALER_SDK_LOG }} | ||
# ZSCALER_SDK_VERBOSE: ${{ secrets.ZSCALER_SDK_VERBOSE }} | ||
ZIA_SDK_TEST_SWEEP: ${{ secrets.ZIA_SDK_TEST_SWEEP }} | ||
ZSCALER_SANDBOX_TOKEN: ${{ secrets.ZSCALER_SANDBOX_TOKEN }} | ||
ZSCALER_SANDBOX_CLOUD: ${{ secrets.ZSCALER_SANDBOX_CLOUD }} | ||
|
||
- name: Publish test coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.out | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: ZPA Test | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
merge_group: | ||
types: [checks_requested] | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 11 * * 1-5' # UTC | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zpa-beta-tenants: | ||
# needs: [zpa-beta-tenants] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goVersion: ["1.22"] | ||
environment: | ||
- ZPA_BETA_TENANT01 | ||
environment: ${{ matrix.environment }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.goVersion }} | ||
|
||
- name: Clean existing Go modules | ||
run: go clean -modcache | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Set Go env | ||
run: | | ||
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | ||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: go mod download | ||
|
||
- name: Run tests with retry | ||
uses: nick-fields/retry@v2 | ||
with: | ||
max_attempts: 3 | ||
timeout_minutes: 20 | ||
command: | | ||
make sweep:zpa | ||
make test:integration:zpa | ||
make sweep:zpa | ||
env: | ||
ZSCALER_CLIENT_ID: ${{ secrets.ZSCALER_CLIENT_ID }} | ||
ZSCALER_CLIENT_SECRET: ${{ secrets.ZSCALER_CLIENT_SECRET }} | ||
ZSCALER_VANITY_DOMAIN: ${{ secrets.ZSCALER_VANITY_DOMAIN }} | ||
ZSCALER_CLOUD: ${{ secrets.ZSCALER_CLOUD }} | ||
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }} | ||
# ZSCALER_SDK_LOG: ${{ secrets.ZSCALER_SDK_LOG }} | ||
# ZSCALER_SDK_VERBOSE: ${{ secrets.ZSCALER_SDK_VERBOSE }} | ||
ZPA_SDK_TEST_SWEEP: ${{ secrets.ZPA_SDK_TEST_SWEEP }} | ||
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }} | ||
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish test coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.out | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.