diff --git a/config/config.go b/config/config.go index fbaf21ce4..4a663610f 100644 --- a/config/config.go +++ b/config/config.go @@ -10,8 +10,8 @@ package config type TestStepConfigFunc func(TestStepConfigRequest) string // TestStepConfigRequest defines the request supplied to types -// implementing TestStepConfigFunc. StepNumber is used in the -// predefined helper functions: +// implementing TestStepConfigFunc. StepNumber is one-based +// and is used in the predefined helper functions: // // - [config.TestStepDirectory] // - [config.TestStepFile]. diff --git a/config/directory.go b/config/directory.go index a7b90eeee..27237c60f 100644 --- a/config/directory.go +++ b/config/directory.go @@ -54,7 +54,8 @@ func TestNameDirectory() func(TestStepConfigRequest) string { // } // // The testing configurations will be expected in the -// testdata/TestExampleCloudThing_basic/1 directory. +// testdata/TestExampleCloudThing_basic/1 directory as +// TestStepConfigRequest.StepNumber is one-based. func TestStepDirectory() func(TestStepConfigRequest) string { //nolint:paralleltest //Not a test return func(req TestStepConfigRequest) string { return filepath.Join("testdata", req.TestName, strconv.Itoa(req.StepNumber)) diff --git a/config/file.go b/config/file.go index c8fe8d5fa..0aa73383b 100644 --- a/config/file.go +++ b/config/file.go @@ -54,7 +54,8 @@ func TestNameFile(file string) func(TestStepConfigRequest) string { // } // // The testing configuration will be expected in the -// testdata/TestExampleCloudThing_basic/1/test.tf file. +// testdata/TestExampleCloudThing_basic/1/test.tf file +// as TestStepConfigRequest.StepNumber is one-based. func TestStepFile(file string) func(TestStepConfigRequest) string { //nolint:paralleltest //Not a test return func(req TestStepConfigRequest) string { return filepath.Join("testdata", req.TestName, strconv.Itoa(req.StepNumber), file)