From c03d4922ec744d39e54e079a4082b9dd1abaed86 Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Tue, 23 Apr 2019 12:27:40 -0300 Subject: [PATCH] Remove outdated test guidance --- CONTRIBUTING.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa00ed88f..ba68ba8dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,21 +101,6 @@ This is easier to read and more consistent - place tests under `{package under test}_test` to enforce testing the external interfaces - if you need to test internally i.e. access non-exported stuff, call the file `{file under test}_internal_test.go` - use our testing utility for easier-to-read assertions: `import . "github.com/runatlantis/atlantis/testing"` and then use `Assert()`, `Equals()` and `Ok()` -- don't try to describe the whole test by its function name. Instead use `t.Log` statements: -```go -// don't do this -func TestLockingWhenThereIsAnExistingLockForNewEnv(t *testing.T) { - ... - -// do this -func TestLockingExisting(t *testing.T) { - t.Log("if there is an existing lock, lock should...") - ... - t.Log("...succeed if the new project has a different path") { - // optionally wrap in a block so it's easier to read - } -``` -- each test should have a `t.Log` that describes what the current state is and what should happen (like a behavioural test) # Creating a New Release 1. Update version number in `main.go`.