From 9f0fe2b4cbdc19fdf8643b1f5f31984a548f5329 Mon Sep 17 00:00:00 2001 From: Dario Maiocchi Date: Mon, 13 Nov 2017 18:32:41 +0100 Subject: Make test don't depend on install --- Makefile | 4 ++-- doc/CONTRIBUTING.md | 29 ++++++----------------------- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index a2adfead..fea63149 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ default: build build: gofmtcheck go build -install: build +install: go install -test: install +test: bash travis/run_acceptance_test.sh vet: @echo "go vet ." diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 6fbcf4c8..49b78559 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -5,30 +5,13 @@ Look at open issues, especially with label: - [junior job](https://github.com/dmacvicar/terraform-provider-libvirt/issues?q=is%3Aissue+is%3Aopen+label%3A%22junior+job%22), - [help wanted](https://github.com/dmacvicar/terraform-provider-libvirt/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) -### Makefile devel workflow. - -Go in your build dir ```cd $GOPATH/src/github.com/dmacvicar/terraform-provider-libvirt```, -then use - -```console -make test -``` - -# Contribute +### Workflow 1. If you have issues, check out the [troubleshooting](https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/doc/TROUBLESHOOTING.md) -2. Do your code (reference issue on your pr if you fix them) [Closing issues keywords](https://help.github.com/articles/closing-issues-using-keywords/) -3. Use the Makefile workflow before submit the PR (building, tests). -4. Test your code by running the acceptance tests ```make test``` -5. Create a PR - -## Writing acceptance tests. - -Look at -https://github.com/hashicorp/terraform/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test +2. Do your code ([reference issue(s)](https://help.github.com/articles/closing-issues-using-keywords/) on your PR if you fix them) +3. Test your code by running the acceptance tests (`make test`) +4. Create a PR -## Running acceptance tests +### Writing acceptance tests -```console -make testacc -``` +Take a look at Terraform's docs about [writing acceptance tests](https://github.com/hashicorp/terraform/blob/master/.github/CONTRIBUTING.md#writing-an-acceptance-test). -- cgit v1.2.3