Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Add test of environment variable escape in rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGarbutt committed Sep 10, 2019
1 parent 427a06f commit 70c55f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/pkg/filesystem_impl/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,11 @@ func Test_GenerateRsyncCmd(t *testing.T) {
cmd, err = generateRsyncCmd(testVolume, request)
assert.Equal(t, "", cmd)
assert.Equal(t, "unsupported source type list for volume: asdf", err.Error())

request.SourceType = datamodel.File
request.Source = "$DW_test"
request.Destination = "dest"
cmd, err = generateRsyncCmd(testVolume, request)
assert.Nil(t, err)
assert.Equal(t, "rsync -ospgu --stats \\$DW_test dest", cmd)
}

0 comments on commit 70c55f6

Please sign in to comment.