}{
// NOTE: Also update MsgSyncResp in safcm test cases when
- // changing anything here!
+ // changing the MsgSyncResp struct!
{
"successful command",
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo; env | grep SAFCM_",
+ Cmd: "echo; env | grep SAFCM_",
},
},
},
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{
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo; env | grep SAFCM_",
+ Cmd: "echo; env | grep SAFCM_",
},
},
},
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo hi; false",
+ Cmd: "echo hi; false",
},
},
},
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{
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo hi; false",
+ Cmd: "echo hi; false",
},
},
},
Commands: []*safcm.Command{
{
OrigGroup: "group1",
- Cmd: "echo first",
+ Cmd: "echo first",
}, {
OrigGroup: "group2",
- Cmd: "echo second",
+ Cmd: "echo second",
}, {
OrigGroup: "group3",
- Cmd: "false",
+ Cmd: "false",
}, {
OrigGroup: "group4",
- Cmd: "echo third",
+ Cmd: "echo third",
},
},
},
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{
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo; env | grep SAFCM_",
+ Cmd: "echo; env | grep SAFCM_",
},
},
},
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{
Commands: []*safcm.Command{
{
OrigGroup: "group",
- Cmd: "echo; env | grep SAFCM_",
+ Cmd: "echo; env | grep SAFCM_",
},
},
},
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{