Remove outdated test guidance

This commit is contained in:
Luke Kysow
2019-04-23 12:27:40 -03:00
committed by GitHub
parent 7026550f94
commit c03d4922ec

View File

@@ -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`.