mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-01 18:30:15 +00:00
Make filesys walk work.
This commit is contained in:
@@ -37,7 +37,7 @@ func TestCreateNoArgs(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateWithResources(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.WriteFile("foo.yaml", []byte(""))
|
||||
fSys.WriteFile("bar.yaml", []byte(""))
|
||||
opts := createFlags{resources: "foo.yaml,bar.yaml"}
|
||||
|
||||
@@ -20,7 +20,7 @@ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
)
|
||||
|
||||
func TestAddPatchHappyPath(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.WriteFile(patchFileName, []byte(patchFileContent))
|
||||
fSys.WriteFile(patchFileName+"another", []byte(patchFileContent))
|
||||
testutils_test.WriteTestKustomization(fSys)
|
||||
@@ -44,7 +44,7 @@ func TestAddPatchHappyPath(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddPatchAlreadyThere(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.WriteFile(patchFileName, []byte(patchFileContent))
|
||||
testutils_test.WriteTestKustomization(fSys)
|
||||
|
||||
@@ -63,7 +63,7 @@ func TestAddPatchAlreadyThere(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddPatchNoArgs(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
|
||||
cmd := newCmdAddPatch(fSys)
|
||||
err := cmd.Execute()
|
||||
|
||||
@@ -20,7 +20,7 @@ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
)
|
||||
|
||||
func TestAddResourceHappyPath(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.WriteFile(resourceFileName, []byte(resourceFileContent))
|
||||
fSys.WriteFile(resourceFileName+"another", []byte(resourceFileContent))
|
||||
testutils_test.WriteTestKustomization(fSys)
|
||||
|
||||
@@ -73,7 +73,7 @@ func TestDataConfigValidation_Flags(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestExpandFileSource(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.Create("dir/fa1")
|
||||
fSys.Create("dir/fa2")
|
||||
fSys.Create("dir/readme")
|
||||
@@ -91,7 +91,7 @@ func TestExpandFileSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestExpandFileSourceWithKey(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
fSys.Create("dir/faaaaaaaaaabbbbbbbbbccccccccccccccccc")
|
||||
fSys.Create("dir/foobar")
|
||||
fSys.Create("dir/simplebar")
|
||||
|
||||
@@ -21,7 +21,7 @@ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
)
|
||||
|
||||
func makeKustomizationPatchFS() filesys.FileSystem {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
fSys := filesys.MakeEmptyDirInMemory()
|
||||
patches := []string{"patch1.yaml", "patch2.yaml"}
|
||||
|
||||
testutils_test.WriteTestKustomizationWith(fSys, []byte(
|
||||
|
||||
Reference in New Issue
Block a user