resources: Include default MetaParams so Validate will pass in tests
This commit is contained in:
@@ -26,13 +26,16 @@ func TestExecSendRecv1(t *testing.T) {
|
||||
BaseRes: BaseRes{
|
||||
Name: "exec1",
|
||||
Kind: "exec",
|
||||
//MetaParams: MetaParams,
|
||||
MetaParams: DefaultMetaParams,
|
||||
},
|
||||
Cmd: "echo hello world",
|
||||
Shell: "/bin/bash",
|
||||
}
|
||||
|
||||
r1.Setup(nil, r1, r1)
|
||||
if err := r1.Validate(); err != nil {
|
||||
t.Errorf("validate failed with: %v", err)
|
||||
}
|
||||
defer func() {
|
||||
if err := r1.Close(); err != nil {
|
||||
t.Errorf("close failed with: %v", err)
|
||||
@@ -73,13 +76,16 @@ func TestExecSendRecv2(t *testing.T) {
|
||||
BaseRes: BaseRes{
|
||||
Name: "exec1",
|
||||
Kind: "exec",
|
||||
//MetaParams: MetaParams,
|
||||
MetaParams: DefaultMetaParams,
|
||||
},
|
||||
Cmd: "echo hello world 1>&2", // to stderr
|
||||
Shell: "/bin/bash",
|
||||
}
|
||||
|
||||
r1.Setup(nil, r1, r1)
|
||||
if err := r1.Validate(); err != nil {
|
||||
t.Errorf("validate failed with: %v", err)
|
||||
}
|
||||
defer func() {
|
||||
if err := r1.Close(); err != nil {
|
||||
t.Errorf("close failed with: %v", err)
|
||||
@@ -120,13 +126,16 @@ func TestExecSendRecv3(t *testing.T) {
|
||||
BaseRes: BaseRes{
|
||||
Name: "exec1",
|
||||
Kind: "exec",
|
||||
//MetaParams: MetaParams,
|
||||
MetaParams: DefaultMetaParams,
|
||||
},
|
||||
Cmd: "echo hello world && echo goodbye world 1>&2", // to stdout && stderr
|
||||
Shell: "/bin/bash",
|
||||
}
|
||||
|
||||
r1.Setup(nil, r1, r1)
|
||||
if err := r1.Validate(); err != nil {
|
||||
t.Errorf("validate failed with: %v", err)
|
||||
}
|
||||
defer func() {
|
||||
if err := r1.Close(); err != nil {
|
||||
t.Errorf("close failed with: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user