manifest becomes kustomization

This commit is contained in:
Jeffrey Regan
2018-04-12 13:31:52 -07:00
parent 5c684d789c
commit 8f0a04c84d
32 changed files with 289 additions and 287 deletions

View File

@@ -34,21 +34,21 @@ func TestInitHappyPath(t *testing.T) {
t.Fatalf("unexpected error: %v", err)
}
f, err := fakeFS.Open(constants.KustomizeFileName)
f, err := fakeFS.Open(constants.KustomizationFileName)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
file := f.(*fs.FakeFile)
if !file.ContentMatches([]byte(manifestTemplate)) {
if !file.ContentMatches([]byte(kustomizationTemplate)) {
t.Fatalf("actual: %v doesn't match expected: %v",
string(file.GetContent()), manifestTemplate)
string(file.GetContent()), kustomizationTemplate)
}
}
func TestInitFileAlreadyExist(t *testing.T) {
content := "hey there"
fakeFS := fs.MakeFakeFS()
fakeFS.WriteFile(constants.KustomizeFileName, []byte(content))
fakeFS.WriteFile(constants.KustomizationFileName, []byte(content))
buf := bytes.NewBuffer([]byte{})
cmd := newCmdInit(buf, os.Stderr, fakeFS)
@@ -56,7 +56,7 @@ func TestInitFileAlreadyExist(t *testing.T) {
if err == nil {
t.Fatalf("expected error")
}
if err.Error() != `"`+constants.KustomizeFileName+`" already exists` {
if err.Error() != `"`+constants.KustomizationFileName+`" already exists` {
t.Fatalf("unexpected error: %v", err)
}
}