зеркало из https://github.com/Azure/draft-classic.git
remove bad test code
This commit is contained in:
Родитель
8ecec2b49f
Коммит
4e3b6da92e
|
@ -4,7 +4,6 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -54,21 +53,4 @@ func TestSymlinkWithFallback(t *testing.T) {
|
|||
if err := SymlinkWithFallback(oldFileNamePath, newFileNamePath); err != nil {
|
||||
t.Errorf("expected no error when calling SymlinkWithFallback() on a file that exists, got %v", err)
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
exists, err := Exists(oldFileNamePath)
|
||||
if err != nil {
|
||||
t.Errorf("expected no error when calling Exists() on a file that does not exist, got %v", err)
|
||||
}
|
||||
if exists {
|
||||
// check that newFileName is a symlink. If this succeeds, then we are running this test as a
|
||||
// user that has permission to create symbolic links, so the old file should still exist.
|
||||
newFile, err := os.Lstat(newFileNamePath)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if newFile.Mode() != os.ModeSymlink {
|
||||
t.Errorf("expected %s to be removed when %s is not a symbolic link", oldFileNamePath, newFileNamePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче