fix: unexpected no releases found for any helmfiles on helmfiles: config (#318)

Fixes #315
Fixes #316
This commit is contained in:
KUOKA Yusuke
2018-09-08 13:50:51 +09:00
committed by GitHub
parent 595c70f85b
commit 7c65b2ed2c
6 changed files with 253 additions and 68 deletions
+13 -2
View File
@@ -1,6 +1,10 @@
package main
import "testing"
import (
"io/ioutil"
"path/filepath"
"testing"
)
// See https://github.com/roboll/helmfile/issues/193
func TestReadFromYaml_DuplicateReleaseName(t *testing.T) {
@@ -16,7 +20,14 @@ func TestReadFromYaml_DuplicateReleaseName(t *testing.T) {
labels:
stage: post
`)
_, _, _, err := loadDesiredStateFromFile(yamlContent, yamlFile, "default", "default", []string{}, "default", logger)
app := &app{
readFile: ioutil.ReadFile,
glob: filepath.Glob,
abs: filepath.Abs,
kubeContext: "default",
logger: logger,
}
_, _, err := app.loadDesiredStateFromYaml(yamlContent, yamlFile, "default", []string{}, "default")
if err == nil {
t.Error("error expected but not happened")
}