Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 29fbde4

Browse files
authored
Merge pull request #501 from alexkappa/patch/DXCDT-12-wiremock
[DXCDT-12] Use wiremock within custom domain verification test
2 parents 4bd85ae + b7096d5 commit 29fbde4

17 files changed

+199
-425
lines changed

.github/workflows/build.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,22 @@ jobs:
2828
- name: Build
2929
run: make build
3030

31+
- name: Start containers
32+
run: docker-compose up -d --build
33+
3134
- name: Test
3235
run: make testacc OPTS=-coverprofile=c.out
3336
env:
3437
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
3538
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
3639
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
37-
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
3840

3941
- name: Send code coverage report
4042
uses: aktions/codeclimate-test-reporter@v1
4143
with:
4244
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
4345
command: after-build --prefix github.com/alexkappa/terraform-provider-auth0
46+
47+
- name: Stop containers
48+
if: always()
49+
run: docker-compose down

CONTRIBUTING.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# Contributing
22

3-
Before you begin, read through some of the Terraform documentation on [Extending
3+
Before you begin, read through the Terraform documentation on [Extending
44
Terraform](https://www.terraform.io/docs/extend/index.html) and [Writing Custom
55
Providers](https://learn.hashicorp.com/collections/terraform/providers).
66

7-
Finally the [HashiCorp Provider Design
7+
Finally, the [HashiCorp Provider Design
88
Principles](https://www.terraform.io/docs/extend/hashicorp-provider-design-principles.html)
99
explore the underlying principles for the design choices of this provider.
1010

11+
## Prerequisites
12+
13+
- [Go 1.13+](https://go.dev/)
14+
- [Docker](https://docs.docker.com/get-docker/) - used for running acceptance tests.
15+
- [Docker-Compose](https://docs.docker.com/compose/install/) - used for running acceptance tests.
16+
1117
## Getting started
1218

1319
To work on the provider, you'll need [Go](http://www.golang.org) installed on
14-
your machine (version 1.10+ is *required*). You'll also need to correctly setup
20+
your machine (version 1.13+ is *required*). You'll also need to correctly set up
1521
a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding
1622
`$GOPATH/bin` to your `$PATH`.
1723

@@ -43,9 +49,8 @@ AUTH0_CLIENT_SECRET=<your-auth0-client-secret>
4349
Then, run `make testacc`.
4450

4551
**Note:** The acceptance tests make calls to a real Auth0 tenant, and create
46-
real resources. Certain tests, for example for custom domains
47-
(`TestAccCustomDomain`), also require a paid Auth0 subscription to be able to
48-
run successfully.
52+
real resources. Certain tests also require a paid Auth0 subscription to be able to
53+
run successfully, e.g. `TestAccCustomDomain` and the ones starting with `TestAccLogStream*`.
4954

5055
**Note:** At the time of writing, the following configuration steps are also
5156
required for the test tenant:
@@ -56,7 +61,7 @@ required for the test tenant:
5661
## Documentation
5762

5863
To make it easier to document new resources a handy script is available. The
59-
script can output documentation of a resource in markdown format, using the
64+
script can output documentation of a resource in Markdown format, using the
6065
schema of the resource itself.
6166

6267
```sh
@@ -80,4 +85,4 @@ git push origin vX.Y.Z
8085

8186
This will trigger the
8287
[Release](https://github.com/alexkappa/terraform-provider-auth0/actions/workflows/release.yml)
83-
GitHub Action which creates a new release.
88+
GitHub Action which creates a new release.

GNUmakefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test: fmtcheck
2222
@echo $(PKGS) | \
2323
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 -run ^$(TESTS)$
2424

25-
testacc: fmtcheck
25+
testacc: fmtcheck dev-up
2626
@TF_ACC=1 go test $(PKGS) -v $(TESTARGS) -timeout 120m -coverprofile=$(COVERS) -run ^$(TESTS)$
2727

2828
vet:
@@ -46,4 +46,7 @@ errcheck:
4646
docgen:
4747
go run scripts/gendocs.go -resource auth0_<resource>
4848

49-
.PHONY: build test testacc vet fmt fmtcheck errcheck docgen
49+
dev-up:
50+
@docker-compose up -d
51+
52+
.PHONY: build test testacc vet fmt fmtcheck errcheck docgen dev-up

auth0/internal/digitalocean/provider.go

-30
This file was deleted.

0 commit comments

Comments
 (0)