Skip to content

Commit

Permalink
test: ftp upload includes outbound path
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Aug 10, 2023
1 parent 4ef7eb6 commit 11f3456
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/upload/ftp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,18 @@ func TestFTP__uploadFile(t *testing.T) {
t.Fatal(err)
}

path := filepath.Join(agent.OutboundPath(), f.Filename)

// manually read file contents
fd, err := agent.client.Reader(f.Filename)
fd, err := agent.client.Reader(path)
require.NoError(t, err)

bs, err := io.ReadAll(fd)
require.NoError(t, err)
require.Equal(t, content, string(bs))

// delete the file
if err := agent.Delete(f.Filename); err != nil {
if err := agent.Delete(path); err != nil {
t.Fatal(err)
}

Expand Down

0 comments on commit 11f3456

Please sign in to comment.