Skip to content

Commit

Permalink
Add missing test case to the exporter config (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman authored Feb 5, 2024
1 parent 67bc76c commit 5393cb7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/config/exporter_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,21 @@ func TestGetConfig(t *testing.T) {
}
})

t.Run("returns error for non-existent file", func(t *testing.T) {
location := "../../fixtures/non_existent.yml"
config, err := GetConfig(location)

if err == nil {
t.Fatal("expected error, got none")
}

if config != nil {
t.Fatal("expected config to be nil")
}
})

t.Run("returns error for invalid config", func(t *testing.T) {
location := "../../fixtures/invalid_config.yml"
location := "../../fixtures/invalid_config.toml"
config, err := GetConfig(location)

if err == nil {
Expand Down

0 comments on commit 5393cb7

Please sign in to comment.