Skip to content

Commit

Permalink
fix testing with new examples directory structure and add some more c…
Browse files Browse the repository at this point in the history
…hecks
  • Loading branch information
tuunit committed May 20, 2023
1 parent 1325e3e commit b906472
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@ import (
"testing"
)

func TestParseConfig(t *testing.T) {

config, err := ParseConfigFile("../../testdata/helm-compose.yaml")
func TestParseSimpleConfig(t *testing.T) {
config, err := ParseConfigFile("../../examples/simple-compose.yaml")

if err != nil {
log.Fatal(err)
}

log.Fatal(config)
if config.State.Name != "simple" {
log.Fatalf("Was expecting state name 'simple' but got '%s'", config.State.Name)
}

if config.State.Type != Local {
log.Fatalf("Was expecting state provider type '%s' but got '%s'", Local, config.State.Type)
}

if len(config.Releases) != 2 {
log.Fatalf("Was expecting 2 release but got %d", len(config.Releases))
}
}

0 comments on commit b906472

Please sign in to comment.