mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 15:38:46 +00:00
Remove outdated test guidance
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user