More tests/examples.

This commit is contained in:
jregan
2019-11-30 11:28:42 -08:00
parent fc8c45cff5
commit 1f85ce454d
8 changed files with 389 additions and 314 deletions

View File

@@ -65,19 +65,16 @@ func NewKustTestHarnessFull(
}
func (th *KustTestHarness) MakeKustTarget() *target.KustTarget {
kt, err := th.MakeKustTargetOrErr()
kt := target.NewKustTarget(
th.ldr, valtest_test.MakeFakeValidator(), th.rf,
transformer.NewFactoryImpl(), th.pl)
err := kt.Load()
if err != nil {
th.t.Fatalf("Unexpected construction error %v", err)
}
return kt
}
func (th *KustTestHarness) MakeKustTargetOrErr() (*target.KustTarget, error) {
return target.NewKustTarget(
th.ldr, valtest_test.MakeFakeValidator(), th.rf,
transformer.NewFactoryImpl(), th.pl)
}
func (th *KustTestHarness) WriteF(dir string, content string) {
err := th.ldr.AddFile(dir, []byte(content))
if err != nil {