Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Jan 14, 2025
1 parent 1d82eff commit bc0e049
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions content/file/file_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,9 @@ func TestStore_Dir_ExtractSymlinkRel(t *testing.T) {

// copy to another file store created from a relative root, to trigger extracting directory
tempDir = t.TempDir()
currDir, err := os.Getwd()
if err != nil {
t.Fatal("error calling Getwd(), error =", err)
}
if err := os.Chdir(tempDir); err != nil {
t.Fatal("error calling Chdir(), error=", err)
}
// cd back to allow the temp directory to be removed
defer os.Chdir(currDir)

dstRel, err := New(".")
if err != nil {
t.Fatal("Store.New() error =", err)
Expand Down Expand Up @@ -218,17 +211,9 @@ func TestStore_Dir_ExtractSymlinkAbs(t *testing.T) {
if err := os.RemoveAll(dirPath); err != nil {
t.Fatal("error calling RemoveAll(), error =", err)
}

currDir, err := os.Getwd()
if err != nil {
t.Fatal("error calling Getwd(), error =", err)
}
if err := os.Chdir(tempDir); err != nil {
t.Fatal("error calling Chdir(), error=", err)
}
// cd back to allow the temp directory to be removed
defer os.Chdir(currDir)

dstRel, err := New(".")
if err != nil {
t.Fatal("Store.New() error =", err)
Expand Down

0 comments on commit bc0e049

Please sign in to comment.