forked from hashicorp/terraform-provider-kubernetes
-
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.
Add provider defined functions for encoding and decoding Kubernetes m…
…anifests (hashicorp#2428)
- Loading branch information
Showing
23 changed files
with
1,416 additions
and
106 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,3 @@ | ||
```release-note:enhancement | ||
Add provider defined functions: `manifest_encode`, `manifest_decode`, `manifest_decode_multi` | ||
``` |
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,33 @@ | ||
name: Provider Functions Unit Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "internal/framework/provider/functions/**/*.go" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "internal/framework/provider/functions/**/*.go" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: Set up Go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Go mod verify | ||
run: go mod verify | ||
- name: Run unit tests | ||
env: | ||
# FIXME this needs to be changed once the 1.8 release goes out | ||
TF_ACC_TERRAFORM_VERSION: 1.8.0-rc1 | ||
run: | | ||
make testfuncs |
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ PKG_NAME := kubernetes | |
OS_ARCH := $(shell go env GOOS)_$(shell go env GOARCH) | ||
TF_PROV_DOCS := $(PWD)/kubernetes/test-infra/tfproviderdocs | ||
|
||
PROVIDER_FUNCTIONS_DIR := "$(PROVIDER_DIR)/internal/framework/provider/functions" | ||
|
||
ifneq ($(PWD),$(PROVIDER_DIR)) | ||
$(error "Makefile must be run from the provider directory") | ||
endif | ||
|
@@ -75,6 +77,9 @@ test: fmtcheck vet | |
testacc: fmtcheck vet | ||
TF_ACC=1 go test $(TEST) -v -vet=off $(TESTARGS) -parallel $(PARALLEL_RUNS) -timeout 3h | ||
|
||
testfuncs: fmtcheck | ||
go test $(PROVIDER_FUNCTIONS_DIR) -v -vet=off $(TESTARGS) -parallel $(PARALLEL_RUNS) | ||
|
||
test-compile: | ||
@if [ "$(TEST)" = "./..." ]; then \ | ||
echo "ERROR: Set TEST to a specific package. For example,"; \ | ||
|
@@ -99,8 +104,8 @@ tests-lint-fix: tools | |
tools: | ||
go install github.com/client9/misspell/cmd/[email protected] | ||
go install github.com/bflad/tfproviderlint/cmd/[email protected] | ||
go install github.com/bflad/tfproviderdocs@v0.9.1 | ||
go install github.com/katbyte/[email protected].2 | ||
go install github.com/bflad/tfproviderdocs@v0.12.0 | ||
go install github.com/katbyte/[email protected].3 | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
go install github.com/hashicorp/go-changelog/cmd/changelog-build@latest | ||
go install github.com/hashicorp/go-changelog/cmd/changelog-entry@latest | ||
|
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.