mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-29 17:41:13 +00:00
Make filesys walk work.
This commit is contained in:
@@ -11,14 +11,19 @@ import (
|
||||
"sigs.k8s.io/kustomize/api/krusty"
|
||||
)
|
||||
|
||||
func TestSomething1(t *testing.T) {
|
||||
// TODO: move most of the tests in api/internal/target
|
||||
// to this package, as they are all high level tests and
|
||||
// examples appropriate to this level and package.
|
||||
// The following test isn't much more than a usage example;
|
||||
// everything is actually tested down in api/internal/target.
|
||||
func TestSomething(t *testing.T) {
|
||||
fSys := filesys.MakeFsInMemory()
|
||||
b := krusty.MakeKustomizer(fSys, krusty.MakeDefaultOptions())
|
||||
_, err := b.Run("hey")
|
||||
_, err := b.Run("noSuchThing")
|
||||
if err == nil {
|
||||
t.Fatalf("expected error")
|
||||
}
|
||||
if err.Error() != "got file 'hey', but 'hey' must be a directory to be a root" {
|
||||
if err.Error() != "'noSuchThing' doesn't exist" {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user