Skip to content

Commit bd0df05

Browse files
committed
[tests] merge two tests
1 parent 1d3e271 commit bd0df05

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

config/config_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,20 +186,20 @@ server:
186186
require.ErrorContains(t, err, "unmarshal")
187187
}
188188

189-
// TestWithLocalYAMLOptionBehavior tests WithLocalYAML option behavior
190-
func TestWithLocalYAMLOptionBehavior(t *testing.T) {
191-
// Test that WithLocalYAML returns a valid Option
192-
option := config.WithLocalYAML("/path/to/config.yaml")
193-
194-
require.NotNil(t, option)
195-
}
196-
197-
// TestWithS3YAMLOptionBehavior tests WithS3YAML option behavior
198-
func TestWithS3YAMLOptionBehavior(t *testing.T) {
199-
// Test that WithS3YAML returns a valid Option
200-
option := config.WithS3YAML("test-bucket", "config.yaml")
201-
202-
require.NotNil(t, option)
189+
// TestOptionConstructors tests option constructors
190+
func TestOptionConstructors(t *testing.T) {
191+
tests := []struct {
192+
name string
193+
fn func() config.Option
194+
}{
195+
{"WithLocalYAML", func() config.Option { return config.WithLocalYAML("/path/to/config.yaml") }},
196+
{"WithS3YAML", func() config.Option { return config.WithS3YAML("test-bucket", "config.yaml") }},
197+
}
198+
for _, tt := range tests {
199+
t.Run(tt.name, func(t *testing.T) {
200+
require.NotNil(t, tt.fn())
201+
})
202+
}
203203
}
204204

205205
// TestEnvironmentVariableTransformation tests environment variable transformation

0 commit comments

Comments
 (0)