Skip to content

Commit

Permalink
Merge pull request #2510 from monopole/makeTestMoreRelocatable
Browse files Browse the repository at this point in the history
Make a test more relocatable.
  • Loading branch information
monopole committed May 21, 2020
2 parents 4c52069 + 0069532 commit d616c9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/internal/plugins/compiler/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"

"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/konfig"
)

func TestDeterminePluginSrcRoot(t *testing.T) {
Expand All @@ -19,8 +20,7 @@ func TestDeterminePluginSrcRoot(t *testing.T) {
if !filepath.IsAbs(actual) {
t.Errorf("expected absolute path, but got '%s'", actual)
}
expectedSuffix := filepath.Join("sigs.k8s.io", "kustomize", "plugin")
if !strings.HasSuffix(actual, expectedSuffix) {
t.Errorf("expected suffix '%s' in '%s'", expectedSuffix, actual)
if !strings.HasSuffix(actual, konfig.RelPluginHome) {
t.Errorf("expected suffix '%s' in '%s'", konfig.RelPluginHome, actual)
}
}

0 comments on commit d616c9c

Please sign in to comment.