1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 01:52:26 +08:00

Merge pull request #2926 from ipfs/feature/fix-test-parse-symlink-#2925

Resolve symlinks of testfiles
This commit is contained in:
Jeromy Johnson
2016-07-01 09:44:01 -07:00
committed by GitHub

View File

@ -4,6 +4,7 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath"
"runtime" "runtime"
"strings" "strings"
"testing" "testing"
@ -287,6 +288,15 @@ func TestArgumentParsing(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
fn, err := filepath.EvalSymlinks(f.Name())
if err != nil {
t.Fatal(err)
}
f.Close()
f, err = os.Create(fn)
if err != nil {
t.Fatal(err)
}
return f return f
} }