mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fs
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -101,3 +102,18 @@ func TestHasPrefix_SlashFooBar(t *testing.T) {
|
||||
t.Fatalf("/foo/bar should have prefix /")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewTempConfirmDir(t *testing.T) {
|
||||
tmp, err := NewTmpConfirmedDir()
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
delinked, err := filepath.EvalSymlinks(string(tmp))
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if string(tmp) != delinked {
|
||||
t.Fatalf("unexpected path containing symlinks")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user