X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=cmd%2Fsafcm-remote%2Fsync%2Fcommands_test.go;h=0bd0949b020b922976744ea9f85e3beacf381cee;hp=f6293b48a99482c34f79a7d27ae764e409d0808f;hb=35c082709bb4fae99e61debf65e146507f265fcc;hpb=b2d5dd94dfb0cf2154f7c2da4b2e0bd292fed77e diff --git a/cmd/safcm-remote/sync/commands_test.go b/cmd/safcm-remote/sync/commands_test.go index f6293b4..0bd0949 100644 --- a/cmd/safcm-remote/sync/commands_test.go +++ b/cmd/safcm-remote/sync/commands_test.go @@ -85,8 +85,8 @@ func TestSyncCommands(t *testing.T) { Env: env, }}, []string{ - `3: sync remote: commands: running "/bin/sh" "-c" "echo; env | grep SAFCM_" (group)`, - "5: sync remote: commands: command output:\nfake stdout/stderr", + `3: commands: running "/bin/sh" "-c" "echo; env | grep SAFCM_" (group)`, + "5: commands: command output:\nfake stdout/stderr", }, safcm.MsgSyncResp{ CommandChanges: []safcm.CommandChange{ @@ -160,8 +160,8 @@ func TestSyncCommands(t *testing.T) { Env: env, }}, []string{ - `3: sync remote: commands: running "/bin/sh" "-c" "echo hi; false" (group)`, - "5: sync remote: commands: command output:\nfake stdout/stderr", + `3: commands: running "/bin/sh" "-c" "echo hi; false" (group)`, + "5: commands: command output:\nfake stdout/stderr", }, safcm.MsgSyncResp{ CommandChanges: []safcm.CommandChange{ @@ -271,11 +271,11 @@ func TestSyncCommands(t *testing.T) { Env: env, }}, []string{ - `3: sync remote: commands: running "/bin/sh" "-c" "echo first" (group1)`, - "5: sync remote: commands: command output:\nfake stdout/stderr first", - `3: sync remote: commands: running "/bin/sh" "-c" "echo second" (group2)`, - "5: sync remote: commands: command output:\nfake stdout/stderr second", - `3: sync remote: commands: running "/bin/sh" "-c" "false" (group3)`, + `3: commands: running "/bin/sh" "-c" "echo first" (group1)`, + "5: commands: command output:\nfake stdout/stderr first", + `3: commands: running "/bin/sh" "-c" "echo second" (group2)`, + "5: commands: command output:\nfake stdout/stderr second", + `3: commands: running "/bin/sh" "-c" "false" (group3)`, }, safcm.MsgSyncResp{ CommandChanges: []safcm.CommandChange{ @@ -388,12 +388,12 @@ func TestSyncCommands(t *testing.T) { Env: env, }}, []string{ - `3: sync remote: commands: running "/bin/sh" "-c" "echo trigger ." (".")`, - "5: sync remote: commands: command output:\nfake stdout/stderr .", - `3: sync remote: commands: running "/bin/sh" "-c" "echo trigger dir" ("dir")`, - "5: sync remote: commands: command output:\nfake stdout/stderr dir", - `3: sync remote: commands: running "/bin/sh" "-c" "echo; env | grep SAFCM_" (group)`, - "5: sync remote: commands: command output:\nfake stdout/stderr", + `3: commands: running "/bin/sh" "-c" "echo trigger ." (".")`, + "5: commands: command output:\nfake stdout/stderr .", + `3: commands: running "/bin/sh" "-c" "echo trigger dir" ("dir")`, + "5: commands: command output:\nfake stdout/stderr dir", + `3: commands: running "/bin/sh" "-c" "echo; env | grep SAFCM_" (group)`, + "5: commands: command output:\nfake stdout/stderr", }, safcm.MsgSyncResp{ CommandChanges: []safcm.CommandChange{ @@ -497,10 +497,10 @@ func TestSyncCommands(t *testing.T) { Env: env, }}, []string{ - `3: sync remote: commands: running "/bin/sh" "-c" "echo trigger ." (".")`, - "5: sync remote: commands: command output:\nfake stdout/stderr .", - `3: sync remote: commands: running "/bin/sh" "-c" "false" ("dir")`, - "5: sync remote: commands: command output:\nfake stdout/stderr dir", + `3: commands: running "/bin/sh" "-c" "echo trigger ." (".")`, + "5: commands: command output:\nfake stdout/stderr .", + `3: commands: running "/bin/sh" "-c" "false" ("dir")`, + "5: commands: command output:\nfake stdout/stderr dir", }, safcm.MsgSyncResp{ CommandChanges: []safcm.CommandChange{