Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 committed Mar 7, 2020
1 parent 6c14d20 commit 8f87267
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/commands/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,19 @@ func TestCopyCommand_ExecuteCommand_Extended(t *testing.T) {
testutil.CheckDeepEqual(t, files[0].Name(), "sym.link")
testutil.CheckDeepEqual(t, false, files[0].Mode()&os.ModeSymlink != 0)
c, err := ioutil.ReadFile(filepath.Join(testDir, "dest", "sym.link"))
if err != nil {
t.Fatal(err)
}
testutil.CheckDeepEqual(t, "woof", string(c))
})

t.Run("copy src symlink dir to a dir", func(t *testing.T) {
testDir, srcDir := setupDirs(t)
defer os.RemoveAll(testDir)
expected, err := ioutil.ReadDir(filepath.Join(testDir, srcDir))
if err != nil {
t.Fatal(err)
}

another := filepath.Join(testDir, "another")
os.Symlink(filepath.Join(testDir, srcDir), another)
Expand Down Expand Up @@ -711,6 +717,9 @@ func TestCopyCommand_ExecuteCommand_Extended(t *testing.T) {
testDir, srcDir := setupDirs(t)
defer os.RemoveAll(testDir)
expected, err := ioutil.ReadDir(filepath.Join(testDir, srcDir))
if err != nil {
t.Fatal(err)
}

another := filepath.Join(testDir, "another")
os.Symlink(filepath.Join(testDir, srcDir), another)
Expand Down

0 comments on commit 8f87267

Please sign in to comment.