From 5dc821a41e7c302aa484a70aa3f524324d569220 Mon Sep 17 00:00:00 2001 From: s-christoff Date: Fri, 12 Feb 2021 10:43:05 -0600 Subject: [PATCH] Add testing section for individual/user testing (#927) --- CONTRIBUTING.md | 20 ++++++++++++++++++++ Makefile | 3 +++ README.md | 7 ++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3c2cb1ecc..4788d5bad7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,4 +66,24 @@ Any enhancements, new features, etc fall into this section. Any bug fixes fall into this section. +## Testing + +To run the entire test suite run this command in the root of the project: + +``` +$ make test +``` + +Before running any test please ensure that Docker is started. Boundary uses a Docker container to initiate a database for testing. +If a test is interrupted check to make certain that all Docker containers have been properly destroyed. + +### Running individual tests + +If you don't want to run the entire test suite, you can just run a singe test +with go. For example, if you wanted to run the tests TestAuthTokenAuthenticator, you would +run: + +``` +$ go test -run TestAuthTokenAuthenticator -v ./internal/auth +``` diff --git a/Makefile b/Makefile index dd61cda8aa..2d0c2bba6e 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,9 @@ website-start: test-ci: install-go ~/.go/bin/go test ./... -v $(TESTARGS) -timeout 120m +test: + ~/.go/bin/go test ./... -timeout 30m + install-go: ./ci/goinstall.sh diff --git a/README.md b/README.md index 6a75421326..67bd562b1b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Boundary -![](boundary.png) +![](boundary.png) [![CircleCI](https://circleci.com/gh/hashicorp/boundary/tree/main.svg?style=svg)](https://circleci.com/gh/hashicorp/boundary/tree/main) ---- **Please note**: We take Boundary's security and our users' trust very @@ -204,3 +204,8 @@ could be taken in a production context: There are many, many more things that Boundary will do in the future in terms of integrations, features, and more. We have a long roadmap planned out, so stay tuned for information about new features and capabilities! + +## Contributing + +Thank you for your interest in contributing! Please refer to +[CONTRIBUTING.md](https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md) for guidance.