Skip to content

Commit

Permalink
Merge pull request hashicorp#263 from terraform-providers/nmckinley-n…
Browse files Browse the repository at this point in the history
…ew-master

Merge the 2.0.0 development branch into the master branch.
  • Loading branch information
nat-henderson authored Dec 21, 2018
2 parents 11f1e18 + 09fdf81 commit be0afb1
Show file tree
Hide file tree
Showing 658 changed files with 53,422 additions and 30,506 deletions.
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ GOOGLE_ORG
GOOGLE_BILLING_ACCOUNT
```

The only region we support running tests in right now is `us-central1` - some products that are tested here are only available in a few regions, and the only region that all products are available in is `us-central1`.

To run a specific test, use a command such as:
```
make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool_basic'
```

The `TESTARGS` variable is regexp-like, so multiple tests can be run in parallel by specifying a common substring of those tests (for example, `TestAccContainerNodePool` to run all node pool tests).

To run all tests, you can simply omit the `TESTARGS` argument - but please keep in mind that that is quite a few tests and will take quite a long time and create some fairly expensive resources. It usually is not advisable to run all tests.

### Writing Tests

Tests should confirm that a resource can be created, and that the resulting Terraform state has the correct values, as well as the created GCP resource.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ terraform.tfplan
terraform.tfstate
bin/
terraform-provider-google
terraform-provider-google-beta
modules-dev/
/pkg/
website/.vagrant
Expand Down
21 changes: 21 additions & 0 deletions .gometalinter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"Deadline": "10m",
"Enable": [
"gofmt",
"misspell",
"structcheck",
"unconvert",
"unused",
"varcheck",
"vet"
],
"EnableGC": true,
"Linters": {
},
"Sort": [
"path",
"line"
],
"Vendor": true,
"WarnUnmatchedDirective": true
}
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ install:
# packages that live there.
# See: https://github.com/golang/go/issues/12933
- bash scripts/gogetcookie.sh
- go get github.com/kardianos/govendor
- make tools

script:
- make lint
- make test
- make vendor-status
- make vet
- make website-test

env:
- GO111MODULE=off

branches:
only:
- master
- 2.0.0
matrix:
fast_finish: true
allow_failures:
Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## 1.20.1 (Unreleased)
## 1.20.0 (December 14, 2018)

DEPRECATIONS:
Expand Down
26 changes: 13 additions & 13 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=google
DIR_NAME=google-beta

default: build

Expand All @@ -16,23 +16,23 @@ test: fmtcheck
testacc: fmtcheck
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -ldflags="-X=github.com/terraform-providers/terraform-provider-google-beta/version.ProviderVersion=acc"

vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi

fmt:
gofmt -w $(GOFMT_FILES)
@echo "==> Fixing source code with gofmt..."
gofmt -w ./$(DIR_NAME)

# Currently required by tf-deploy compile
fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

errcheck:
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
lint:
@echo "==> Checking source code against linters..."
@gometalinter ./$(DIR_NAME)

tools:
@echo "==> installing required tooling..."
go get -u github.com/kardianos/govendor
go get -u github.com/alecthomas/gometalinter
gometalinter --install

vendor-status:
@govendor status
Expand Down
66 changes: 66 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module github.com/terraform-providers/terraform-provider-google-beta

require (
cloud.google.com/go v0.0.0-20180830051854-591e253d3208
github.com/agext/levenshtein v1.2.1 // indirect
github.com/apparentlymart/go-cidr v0.0.0-20170418151526-7e4b007599d4
github.com/apparentlymart/go-textseg v0.0.0-20170531203952-b836f5c4d331 // indirect
github.com/armon/go-radix v0.0.0-20170727155443-1fca145dffbc // indirect
github.com/aws/aws-sdk-go v1.8.34 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/davecgh/go-spew v1.1.0
github.com/dustinkirkland/golang-petname v0.0.0-20170921220637-d3c2ba80e75e // indirect
github.com/go-ini/ini v1.23.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
github.com/google/go-cmp v0.2.0 // indirect
github.com/googleapis/gax-go v0.0.0-20180702194919-1ef592c90f47 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce
github.com/hashicorp/go-cleanhttp v0.0.0-20170211013415-3573b8b52aa7
github.com/hashicorp/go-getter v0.0.0-20180109202350-961f56d2e933 // indirect
github.com/hashicorp/go-hclog v0.0.0-20171005151751-ca137eb4b438 // indirect
github.com/hashicorp/go-multierror v0.0.0-20150916205742-d30f09973e19
github.com/hashicorp/go-plugin v0.0.0-20171029214425-e2fbc6864d18 // indirect
github.com/hashicorp/go-uuid v0.0.0-20160120003506-36289988d83c // indirect
github.com/hashicorp/go-version v0.0.0-20161031182605-e96d38404026
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
github.com/hashicorp/hcl2 v0.0.0-20171003232734-44bad6dbf549 // indirect
github.com/hashicorp/hil v0.0.0-20170512213305-fac2259da677 // indirect
github.com/hashicorp/logutils v0.0.0-20150609070431-0dc08b1671f3 // indirect
github.com/hashicorp/terraform v0.11.9-0.20180926212128-35d82b055591
github.com/hashicorp/vault v0.8.3 // indirect
github.com/hashicorp/yamux v0.0.0-20160720233140-d1caa6c97c9f // indirect
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 // indirect
github.com/jtolds/gls v4.2.1+incompatible // indirect
github.com/keybase/go-crypto v0.0.0-20170628152938-433e2f3d43ef // indirect
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 // indirect
github.com/mattn/go-isatty v0.0.4 // indirect
github.com/mitchellh/cli v0.0.0-20170908181043-65fcae5817c8 // indirect
github.com/mitchellh/copystructure v0.0.0-20170525013902-d23ffcb85de3 // indirect
github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747 // indirect
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 // indirect
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
github.com/mitchellh/hashstructure v0.0.0-20160209213820-6b17d669fac5
github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 // indirect
github.com/mitchellh/reflectwalk v0.0.0-20170726202117-63d60e9d0dbc // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v0.0.0-20171104095702-dc2bc5a81acc // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
github.com/stoewer/go-strcase v1.0.1
github.com/stretchr/testify v1.2.2 // indirect
github.com/terraform-providers/terraform-provider-random v0.0.0-20180820145304-a3da7a23d7f9
github.com/ulikunitz/xz v0.5.4 // indirect
github.com/zclconf/go-cty v0.0.0-20180106055834-709e4033eeb0 // indirect
go.opencensus.io v0.0.0-20180828222441-6ce7b575fc2d // indirect
golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac // indirect
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d // indirect
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 // indirect
google.golang.org/api v0.0.0-20181102150758-04bb50b6b83d
google.golang.org/appengine v0.0.0-20180827170113-03cac3b07182 // indirect
)
Loading

0 comments on commit be0afb1

Please sign in to comment.