bflad / tfproviderlint

Terraform Provider Lint Tool
Mozilla Public License 2.0
134 stars 25 forks source link

Ensure Acceptance Test Names Use Same Prefix in Single File #219

Closed bflad closed 3 years ago

bflad commented 3 years ago

Community Note

Description

There have been cases of capitalization differences in new tests and other code refactorings causing acceptance test function names to drift from a single standard within a file. Each file should ideally implement the same prefixed test naming so it is easier for contributors to run all acceptance tests for a particular resource.

New Checks

Flagged Provider Code

func TestAccExampleThing_FirstAttribute(t *testing.T) { /* ... */ }

func TestAccExampleOopsThing_SecondAttribute(t *testing.T) { /* ... */ }

func TestAccExampleTHING_ThirdAttribute(t *testing.T) { /* ... */ }

Passing Provider Code

func TestAccExampleThing_FirstAttribute(t *testing.T) { /* ... */ }

func TestAccExampleThing_SecondAttribute(t *testing.T) { /* ... */ }

func TestAccExampleThing_ThirdAttribute(t *testing.T) { /* ... */ }