Skip to content

Commit dbc0e15

Browse files
fix tests
1 parent c92c260 commit dbc0e15

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

config/profile_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,11 @@ func TestPathAndTagInRetention(t *testing.T) {
708708
require.Greater(t, len(backupSource), 5)
709709
require.NoError(t, err)
710710

711+
expectedBackupSource := make([]string, len(backupSource))
712+
for index, value := range backupSource {
713+
expectedBackupSource[index] = shell.NewArg(value, shell.ArgConfigEscape).String()
714+
}
715+
711716
backupHost := ""
712717
backupTags := []string{"one", "two"}
713718
flatBackupTags := func() []string { return []string{strings.Join(backupTags, ",")} }
@@ -820,15 +825,16 @@ func TestPathAndTagInRetention(t *testing.T) {
820825

821826
t.Run("ImplicitCopyPath", func(t *testing.T) {
822827
profile := testProfile(t, Version01, ``)
823-
assert.Equal(t, backupSource, pathFlag(t, profile))
828+
t.Log(profile)
829+
assert.Equal(t, expectedBackupSource, pathFlag(t, profile))
824830
})
825831

826832
t.Run("ExplicitCopyPath", func(t *testing.T) {
827833
expectedIssues := map[string][]string{
828834
`path (from source) "` + sourcePattern + `"`: backupSource,
829835
}
830836
profile := testProfile(t, Version01, `path = true`)
831-
assert.Equal(t, backupSource, pathFlag(t, profile))
837+
assert.Equal(t, expectedBackupSource, pathFlag(t, profile))
832838
assert.Equal(t, expectedIssues, profile.config.issues.changedPaths)
833839

834840
profile.config.DisplayConfigurationIssues()

0 commit comments

Comments
 (0)