AT006

Acceptance testsStandard

check for acceptance test functions containing multiple resource.Test() invocations

The AT006 analyzer reports acceptance test functions that contain multiple resource.Test() invocations. Acceptance tests should be split by invocation.

Examples

func TestAccExampleThing_basic(t *testing.T) {
  resource.Test(/* ... */)
  resource.Test(/* ... */)
}
func TestAccExampleThing_first(t *testing.T) {
  resource.Test(/* ... */)
}

func TestAccExampleThing_second(t *testing.T) {
  resource.Test(/* ... */)
}

Ignoring reports

Singular reports can be ignored by adding a //lintignore:AT006 Go code comment at the end of the offending line or on the line immediately preceding, e.g.

//lintignore:AT006
func TestAccExampleThing_basic(t *testing.T) {
  resource.Test(/* ... */)
  resource.Test(/* ... */)
}

This page is generated from passes/AT006/README.md, which lives beside the analyzer.