AT007

Acceptance testsStandard

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

The AT007 analyzer reports acceptance test functions that contain multiple resource.ParallelTest() invocations. Acceptance tests should be split by invocation and multiple resource.ParallelTest() will cause a panic.

Examples

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

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

Ignoring reports

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

//lintignore:AT007
func TestAccExampleThing_basic(t *testing.T) {
  resource.ParallelTest(/* ... */)
  resource.ParallelTest(/* ... */)
}

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