Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/add provider testing #27

Merged
merged 27 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a0b3d2c
chore: add vagrant files for testacc
d-strobel Jun 23, 2024
9fd6e73
chore: rename GNUmakefile -> Makefile
d-strobel Sep 26, 2024
42ca5ac
chore: change go package name
d-strobel Sep 26, 2024
c75d32d
test: add helper acctest package
d-strobel Sep 26, 2024
885a2e4
chore: fmt json
d-strobel Sep 26, 2024
5ffa632
test: add test for data-source windows_local_group
d-strobel Sep 26, 2024
debc50b
chore: remove old code
d-strobel Sep 26, 2024
20b0d99
docs: add acctest package comment
d-strobel Sep 26, 2024
3a17933
test: add test for windows_local_group resource
d-strobel Sep 28, 2024
a887aa3
test: add test for windows_local_groups data-source
d-strobel Sep 28, 2024
4fe3cc1
test: add test for windows_local_user resource
d-strobel Sep 29, 2024
10d026b
test: add test for windows_local_user data-source
d-strobel Sep 29, 2024
9f37d2a
test: add test for windows_local_users data-source
d-strobel Sep 29, 2024
fab8282
test: add test for windows_local_group_members data-source
d-strobel Sep 29, 2024
0bec075
test: add test for windows_local_group_member resource
d-strobel Sep 29, 2024
9d93a0a
chore: rename test environment variables
d-strobel Oct 13, 2024
d2b1afe
chore: add test fixture files
d-strobel Oct 13, 2024
d921d9a
test: add opentofu acctesting to Makefile
d-strobel Oct 13, 2024
ad0d9a1
chore(deps): update go mod
d-strobel Oct 13, 2024
2fb251d
test: add acctest for provider configs
d-strobel Oct 13, 2024
7a4a9ea
test: update local subpackage tests
d-strobel Oct 13, 2024
598e4c6
chore: remove vagrant ad machine for current state of project
d-strobel Oct 13, 2024
b9c7363
test: add import testing for resource windows_local_user
d-strobel Oct 17, 2024
f93ac9e
fix: resource windows_local_user import. standard should be import by id
d-strobel Oct 17, 2024
3aaeff4
test: add import test for windows_local_group
d-strobel Oct 17, 2024
7454b7e
test: add import test for resource windows_local_group_member
d-strobel Oct 17, 2024
1aa3bed
feat: implement import state for resource windows_local_group_member
d-strobel Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions GNUmakefile

This file was deleted.

46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Terminal colors
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m

# Source .env file if available
ifneq ("$(wildcard .env)","")
include .env
else
include ./vagrant/vagrant.env
endif

# Generate all
.PHONY: generate
generate:
@printf "$(OK_COLOR)==> Go generate$(NO_COLOR)\n"
@go generate ./...

# Setup requirements
.PHONY: vagrant-up
vagrant-up:
@printf "$(OK_COLOR)==> Setup vagrant machines$(NO_COLOR)\n"
@$(MAKE) -C vagrant vagrant-up

# Remove requirements
.PHONY: vagrant-down
vagrant-down:
@printf "$(OK_COLOR)==> Remove vagrant machines$(NO_COLOR)\n"
@$(MAKE) -C vagrant vagrant-down

# Run acceptance tests
.PHONY: testacc
testacc: testacc-terraform testacc-opentofu

# Run Terraform acceptance tests
.PHONY: testacc-terraform
testacc-terraform:
@printf "$(OK_COLOR)==> Run Terraform acceptance tests$(NO_COLOR)\n"
TF_ACC=1 go test ./internal/provider/... -v $(TESTARGS) -timeout 120m

# Run OpenTofu acceptance tests
.PHONY: testacc-opentofu
testacc-opentofu:
@printf "$(OK_COLOR)==> Run OpenTofu acceptance tests$(NO_COLOR)\n"
TF_ACC_TERRAFORM_PATH="$(shell which tofu)" TF_ACC_PROVIDER_NAMESPACE="hashicorp" TF_ACC_PROVIDER_HOST="registry.opentofu.org" TF_ACC=1 go test ./internal/provider/... -v $(TESTARGS) -timeout 120m
60 changes: 40 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module terraform-provider-windows
module github.com/d-strobel/terraform-provider-windows

go 1.22

Expand All @@ -8,21 +8,39 @@ require (
github.com/d-strobel/gowindows v1.1.0
github.com/hashicorp/terraform-plugin-codegen-framework v0.3.1
github.com/hashicorp/terraform-plugin-docs v0.17.0
github.com/hashicorp/terraform-plugin-framework v1.5.0
github.com/hashicorp/terraform-plugin-framework v1.11.0
github.com/hashicorp/terraform-plugin-framework-timetypes v0.3.0
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.20.0
github.com/hashicorp/terraform-plugin-go v0.23.0
github.com/hashicorp/terraform-plugin-log v0.9.0
)

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
Expand All @@ -32,21 +50,22 @@ require (
github.com/fatih/color v1.16.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.2 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.20.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.7.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-codegen-spec v0.1.1-0.20231024091233-c659ac8a54fc // indirect
github.com/hashicorp/terraform-plugin-testing v1.9.0
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
Expand All @@ -72,6 +91,7 @@ require (
github.com/russross/blackfriday v1.6.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/stretchr/testify v1.9.0
github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
Expand All @@ -80,15 +100,15 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/yuin/goldmark v1.6.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
golang.org/x/crypto v0.22.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/grpc v1.60.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading
Loading