Add --env/-e flag

This commit is contained in:
Donny Xia
2020-09-15 11:49:26 -07:00
parent ad7fed061e
commit 327035a43a
2 changed files with 18 additions and 0 deletions

View File

@@ -204,6 +204,7 @@ apiVersion: v1
Path: "dir",
NetworkName: "bridge",
EnableStarlark: true,
Env: []string{},
},
},
{
@@ -257,6 +258,7 @@ apiVersion: v1
Path: "dir",
NetworkName: "bridge",
ResultsDir: "foo/",
Env: []string{},
},
expected: `
metadata:
@@ -292,6 +294,17 @@ apiVersion: v1
Path: "dir",
NetworkName: "bridge",
LogSteps: true,
Env: []string{},
},
},
{
name: "envs",
args: []string{"run", "dir", "--env", "FOO=BAR", "-e", "BAR"},
path: "dir",
expectedStruct: &runfn.RunFns{
Path: "dir",
NetworkName: "bridge",
Env: []string{"FOO=BAR", "BAR"},
},
},
}