X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=cmd%2Fsafcm-remote%2Fsync%2Fcommands_test.go;h=ba7f4a2e89ec47e16fec11f88f41aad4577a2617;hp=142a2542a931d4191d56f0b5be641da6a2b00cd7;hb=1934f1ab83306dff45310d5b45e2a99c97e28c35;hpb=2f27353fdf81b3d0dff842a4d2e24b8963a65c6b diff --git a/cmd/safcm-remote/sync/commands_test.go b/cmd/safcm-remote/sync/commands_test.go index 142a254..ba7f4a2 100644 --- a/cmd/safcm-remote/sync/commands_test.go +++ b/cmd/safcm-remote/sync/commands_test.go @@ -65,8 +65,10 @@ func TestSyncCommands(t *testing.T) { "group2", "host.example.org", }, - Commands: []string{ - "echo; env | grep SAFCM_", + Commands: []*safcm.Command{ + { + Cmd: "echo; env | grep SAFCM_", + }, }, }, nil, @@ -105,8 +107,10 @@ func TestSyncCommands(t *testing.T) { "group2", "host.example.org", }, - Commands: []string{ - "echo; env | grep SAFCM_", + Commands: []*safcm.Command{ + { + Cmd: "echo; env | grep SAFCM_", + }, }, }, nil, @@ -134,8 +138,10 @@ func TestSyncCommands(t *testing.T) { "group2", "host.example.org", }, - Commands: []string{ - "echo hi; false", + Commands: []*safcm.Command{ + { + Cmd: "echo hi; false", + }, }, }, nil, @@ -175,8 +181,10 @@ func TestSyncCommands(t *testing.T) { "group2", "host.example.org", }, - Commands: []string{ - "echo hi; false", + Commands: []*safcm.Command{ + { + Cmd: "echo hi; false", + }, }, }, nil, @@ -204,11 +212,16 @@ func TestSyncCommands(t *testing.T) { "group2", "host.example.org", }, - Commands: []string{ - "echo first", - "echo second", - "false", - "echo third", + Commands: []*safcm.Command{ + { + Cmd: "echo first", + }, { + Cmd: "echo second", + }, { + Cmd: "false", + }, { + Cmd: "echo third", + }, }, }, nil, @@ -318,8 +331,10 @@ func TestSyncCommands(t *testing.T) { }, }, }, - Commands: []string{ - "echo; env | grep SAFCM_", + Commands: []*safcm.Command{ + { + Cmd: "echo; env | grep SAFCM_", + }, }, }, []string{ @@ -434,8 +449,10 @@ func TestSyncCommands(t *testing.T) { }, }, }, - Commands: []string{ - "echo; env | grep SAFCM_", + Commands: []*safcm.Command{ + { + Cmd: "echo; env | grep SAFCM_", + }, }, }, []string{