File tree Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 1+ // Use and distribution licensed under the Apache license version 2.
2+ //
3+ // See the COPYING file in the root project directory for full text.
4+
5+ package exec
6+
7+ // Action describes a single execution of one or more commands via the
8+ // operating system's `exec` family of functions.
9+ type Action struct {
10+ // Exec is the exact command to execute.
11+ //
12+ // You may execute more than one command but must include the `shell` field
13+ // to indicate that the command should be run in a shell. It is best
14+ // practice, however, to simply use multiple `exec` specs instead of
15+ // executing multiple commands in a single shell call.
16+ Exec string `yaml:"exec"`
17+ // Shell is the specific shell to use in executing the command. If empty
18+ // (the default), no shell is used to execute the command and instead the
19+ // operating system's `exec` family of calls is used.
20+ Shell string `yaml:"shell,omitempty"`
21+ }
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ func TestSimpleCommand(t *testing.T) {
5757 Index : 0 ,
5858 Defaults : & gdttypes.Defaults {},
5959 },
60- Exec : "ls" ,
60+ Action : gdtexec.Action {
61+ Exec : "ls" ,
62+ },
6163 },
6264 }
6365 assert .Equal (expTests , s .Tests )
Original file line number Diff line number Diff line change @@ -12,17 +12,7 @@ import (
1212// operating system's `exec` family of functions.
1313type Spec struct {
1414 gdttypes.Spec
15- // Exec is the exact command to execute.
16- //
17- // You may execute more than one command but must include the `shell` field
18- // to indicate that the command should be run in a shell. It is best
19- // practice, however, to simply use multiple `exec` specs instead of
20- // executing multiple commands in a single shell call.
21- Exec string `yaml:"exec"`
22- // Shell is the specific shell to use in executing the command. If empty
23- // (the default), no shell is used to execute the command and instead the
24- // operating system's `exec` family of calls is used.
25- Shell string `yaml:"shell,omitempty"`
15+ Action
2616 // Assert is an object containing the conditions that the Spec will assert.
2717 Assert * Expect `yaml:"assert,omitempty"`
2818}
You can’t perform that action at this time.
0 commit comments