Skip to content

Commit

Permalink
Fix: Upgraded to Zscaler SDK GO v2.4.35 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
willguibr authored May 2, 2024
1 parent f524ff2 commit bf8af44
Show file tree
Hide file tree
Showing 17 changed files with 3,201 additions and 68 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/zia-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
timeout_minutes: 120
command: |
make sweep
go test -v -cover ./zia -v -parallel=4 -timeout 120m
make test:integration:zia
make sweep
env:
Expand All @@ -84,6 +84,13 @@ jobs:
TF_ACC: ${{ secrets.TF_ACC }}
ZIA_ACC_TEST_FORCE_SWEEPERS: ${{ secrets.ZIA_ACC_TEST_FORCE_SWEEPERS }}

- name: Publish test coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
fail_ci_if_error: true

zia-test-tenants:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -138,7 +145,7 @@ jobs:
timeout_minutes: 120
command: |
make sweep
go test -v -cover ./zia -v -parallel=4 -timeout 120m
make test:integration:zia
make sweep
env:
ZIA_USERNAME: ${{ secrets.ZIA_USERNAME }}
Expand All @@ -152,8 +159,13 @@ jobs:
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }}
TF_ACC: ${{ secrets.TF_ACC }}
ZIA_ACC_TEST_FORCE_SWEEPERS: ${{ secrets.ZIA_ACC_TEST_FORCE_SWEEPERS }}
# needs:
# - zia-zsbeta-tests

- name: Publish test coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
fail_ci_if_error: true

zia-zscalerone-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -221,8 +233,13 @@ jobs:
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }}
TF_ACC: ${{ secrets.TF_ACC }}
ZIA_ACC_TEST_FORCE_SWEEPERS: ${{ secrets.ZIA_ACC_TEST_FORCE_SWEEPERS }}
# needs:
# - zia-zsbeta-tests

- name: Publish test coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
fail_ci_if_error: true

zia-zscalertwo-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -290,5 +307,10 @@ jobs:
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }}
TF_ACC: ${{ secrets.TF_ACC }}
ZIA_ACC_TEST_FORCE_SWEEPERS: ${{ secrets.ZIA_ACC_TEST_FORCE_SWEEPERS }}
# needs:
# - zia-zsbeta-tests

- name: Publish test coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.out
fail_ci_if_error: true
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 2.8.21 (April, 8 2024)

### Notes

- Release date: **(April, 8 2024)**
- Supported Terraform version: **v1.x**

### Enhancements

- [PR #336](https://github.com/zscaler/terraform-provider-zia/336) - Upgraded provider to [Zscaler-SDK-GO v2.4.35](https://github.com/zscaler/zscaler-sdk-go/releases/tag/v2.4.35)

## 2.8.2 (April, 8 2024)

### Notes

- Release date: **(April, 8 2024)**
- Supported Terraform version: **v1.x**

## 2.8.2 (April, 8 2024)

### Notes
Expand Down
19 changes: 13 additions & 6 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ sweep:

test:
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) $(TEST_FILTER) -timeout=120s -parallel=4
xargs -t -n4 go test $(TESTARGS) $(TEST_FILTER) -timeout=30s -parallel=10

testacc:
TF_ACC=1 go test $(TEST) $(TESTARGS) $(TEST_FILTER) -timeout 120m

test\:integration\:zia:
@echo "$(COLOR_ZSCALER)Running zia integration tests...$(COLOR_NONE)"
@TF_ACC=1 go test -v -race -cover -coverprofile=coverage.out -covermode=atomic ./zia -parallel 20 -timeout 120m
go tool cover -html=coverage.out -o coverage.html

# Default set of integration tests to run for ZscalerOne
DEFAULT_INTEGRATION_TESTS?=\
TestAccDataSourceActivationStatus_Basic \
Expand Down Expand Up @@ -111,7 +116,8 @@ integration_tests := $(subst $(space),\|,$(INTEGRATION_TESTS))
# Target to run integration tests for ZscalerOne
test\:integration\:zscalerone:
@echo "Running integration tests for ZscalerOne..."
@TF_ACC=1 go test -v -cover ./zia -parallel=4 -timeout 120m -run ^$(integration_tests)$$
@TF_ACC=1 go test -v -race -cover -coverprofile=coverage.out -covermode=atomic ./zia -parallel 20 -timeout 120m -run ^$(integration_tests)$$
go tool cover -html=coverage.out -o coverage.html

# Default set of integration tests to run for ZscalerOne
ZS2_INTEGRATION_TESTS?=\
Expand Down Expand Up @@ -182,19 +188,20 @@ integration_zs2_tests := $(subst $(space),\|,$(ZS_INTEGRATION_TESTS))
# Target to run integration tests for ZscalerTwo
test\:integration\:zscalertwo:
@echo "Running integration tests for ZscalerTwo..."
@TF_ACC=1 go test -v -cover ./zia -parallel=4 -timeout 120m -run ^$(integration_zs2_tests)$$
@TF_ACC=1 go test -v -race -cover -coverprofile=coverage.out -covermode=atomic ./zia -parallel 20 -timeout 120m -run ^$(integration_zs2_tests)$$
go tool cover -html=coverage.out -o coverage.html

build13: GOOS=$(shell go env GOOS)
build13: GOARCH=$(shell go env GOARCH)
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.8.2/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(APPDATA)/terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.8.23/$(GOOS)_$(GOARCH)
else
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.8.2/$(GOOS)_$(GOARCH)
build13: DESTINATION=$(HOME)/.terraform.d/plugins/$(ZIA_PROVIDER_NAMESPACE)/2.8.23/$(GOOS)_$(GOARCH)
endif
build13: fmtcheck
@echo "==> Installing plugin to $(DESTINATION)"
@mkdir -p $(DESTINATION)
go build -o $(DESTINATION)/terraform-provider-zia_v2.8.2
go build -o $(DESTINATION)/terraform-provider-zia_v2.8.23

coverage: test
@echo "✓ Opening coverage for unit tests ..."
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![Test](https://github.com/zscaler/terraform-provider-zia/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/zscaler/terraform-provider-zia/actions/workflows/test.yml)
[![Release](https://github.com/zscaler/terraform-provider-zia/actions/workflows/release.yml/badge.svg?branch=master)](https://github.com/zscaler/terraform-provider-zia/actions/workflows/release.yml)
[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/zscaler/terraform-provider-zia)](https://github.com/zscaler/terraform-provider-zia/v2/blob/master/.go-version)
[![Go Report Card](https://goreportcard.com/badge/github.com/zscaler/terraform-provider-zia)](https://goreportcard.com/report/github.com/zscaler/terraform-provider-zia)
[![codecov](https://codecov.io/gh/zscaler/terraform-provider-zia/graph/badge.svg?token=A9J4AJS7F5)](https://codecov.io/gh/zscaler/terraform-provider-zia)
[![License](https://img.shields.io/github/license/zscaler/terraform-provider-zia?color=blue)](https://github.com/zscaler/terraform-provider-zia/v2/blob/master/LICENSE)
[![Zscaler Community](https://img.shields.io/badge/zscaler-community-blue)](https://community.zscaler.com/)
[![Slack](https://img.shields.io/badge/Join%20Our%20Community-Slack-blue)](https://forms.gle/3iMJvVmJDvmUy36q9)

Expand Down
17 changes: 17 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ignore:
- "vendor/**/*"
- "dist/**/*"

coverage:
status:
project: yes
patch: yes
changes: yes
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: yes # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
branches:
- master
Loading

0 comments on commit bf8af44

Please sign in to comment.