true,
[]string{"no-settings.example.org"},
`<LOG>[info] [no-settings.example.org] remote helper upload in progress
+<LOG>[info] [no-settings.example.org] no changes
`,
nil,
},
"no settings (no helper upload)",
false,
[]string{"no-settings.example.org"},
+ `<LOG>[info] [no-settings.example.org] no changes
+`,
+ nil,
+ },
+ {
+ "no settings (error)",
+ true,
+ []string{"-log", "error", "no-settings.example.org"},
``,
nil,
},
`<LOG>[info] [no-settings.example.org] remote helper upload in progress
<LOG>[verbose] [no-settings.example.org] host groups: all <DET> <DET> no-settings.example.org
<LOG>[verbose] [no-settings.example.org] host group priorities (desc. order): no-settings.example.org
+<LOG>[info] [no-settings.example.org] no changes
`,
nil,
},
`<LOG>[info] [no-settings.example.org] remote helper upload in progress
<LOG>[verbose] [no-settings.example.org] host groups: all <DET> <DET> no-settings.example.org
<LOG>[verbose] [no-settings.example.org] host group priorities (desc. order): no-settings.example.org
+<LOG>[info] [no-settings.example.org] no changes
`,
nil,
},
s.formatCommandChanges(resp.CommandChanges))
}
if len(changes) == 0 {
- return ""
+ // Notify user that the host was synced successfully
+ return "no changes"
}
x := strings.Join(changes, "\n")