Plugin loader improvements.

This commit is contained in:
jregan
2020-04-18 07:22:39 -07:00
parent c7b00733c1
commit 1653a70693
13 changed files with 139 additions and 78 deletions

View File

@@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"testing"
"time"
"sigs.k8s.io/kustomize/api/filesys"
. "sigs.k8s.io/kustomize/api/internal/plugins/compiler"
@@ -38,7 +39,7 @@ func TestCompiler(t *testing.T) {
if err != nil {
t.Error(err)
}
if !RecentFileExists(expectObj) {
if !FileYoungerThan(expectObj, time.Second) {
t.Errorf("didn't find expected obj file %s", expectObj)
}
@@ -52,7 +53,7 @@ func TestCompiler(t *testing.T) {
if err != nil {
t.Error(err)
}
if !RecentFileExists(expectObj) {
if !FileYoungerThan(expectObj, time.Second) {
t.Errorf("didn't find expected obj file %s", expectObj)
}