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

Asb/reorg #1

Merged
merged 7 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Update Makefile for running accepance tests under new organization.
  • Loading branch information
andrewsomething committed Feb 3, 2023
commit e9ecedd881ecb89681ec38235ffb4b15bad79706
16 changes: 5 additions & 11 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
PKG_NAME=digitalocean
PKG_NAME:=digitalocean
ACCTEST_TIMEOUT:=120m
ACCTEST_PARALLELISM:=2

default: build

Expand All @@ -13,7 +15,7 @@ test: fmtcheck
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
TF_ACC=1 go test -v ./$(PKG_NAME)/... $(TESTARGS) -timeout $(ACCTEST_TIMEOUT) -parallel=$(ACCTEST_PARALLELISM)

vet:
@echo "go vet ."
Expand All @@ -26,7 +28,7 @@ vet:

sweep:
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test ./digitalocean -v -sweep=1
go test ./digitalocean/... -v -sweep=1

goimports:
@echo "==> Fixing imports code with goimports..."
Expand All @@ -47,14 +49,6 @@ fmtcheck:
errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
echo "ERROR: Set TEST to a specific package. For example,"; \
echo " make test-compile TEST=./$(PKG_NAME)"; \
exit 1; \
fi
go test -c $(TEST) $(TESTARGS)

website:
@echo "Use this site to preview markdown rendering: https://registry.terraform.io/tools/doc-preview"

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ In order to run a specific acceptance test, use the `TESTARGS` environment varia
$ make testacc TESTARGS='-run=TestAccDigitalOceanDomain_Basic'
```

All acceptance tests for a specific package can be run by setting the `PKG_NAME` environment variable. For example:

```sh
$ make testacc PKG_NAME=digitalocean/account
```

In order to check changes you made locally to the provider, you can use the binary you just compiled by adding the following
to your `~/.terraformrc` file. This is valid for Terraform 0.14+. Please see
[Terraform's documentation](https://www.terraform.io/docs/cli/config/config-file.html#development-overrides-for-provider-developers)
Expand Down Expand Up @@ -111,7 +117,7 @@ To release the provider:
git tag -m "release $new_version" -a "$new_version"
```

1. Push the tag:
1. Push the tag:

```bash
git push "$origin" tag "$new_version"
Expand Down