summaryrefslogtreecommitdiff
path: root/cmd/podman/create_cli_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@suse.com>2018-10-17 09:25:26 +0200
committerValentin Rothberg <vrothberg@suse.com>2018-10-23 12:57:14 +0200
commit125202923f00f43fd102760b3340b86dd72a4c7d (patch)
tree5af0be5d57c87fa593dfc66ac4c4047370a87d5b /cmd/podman/create_cli_test.go
parent58a26ac9dcb0d75ca7f061941c1399a28579ed69 (diff)
downloadpodman-125202923f00f43fd102760b3340b86dd72a4c7d.tar.gz
podman-125202923f00f43fd102760b3340b86dd72a4c7d.tar.bz2
podman-125202923f00f43fd102760b3340b86dd72a4c7d.zip
fix environment variable parsing
Fix the parsing of environment variables to catch invalid ones, such as `-e = ` or `-e =A`, early in the stack to return meaningful error messages. Also, instead of erroring out, set unspecified env variables as empty (e.g., `-e FOO`) to remain compatible with Docker. Fixes: #1663 Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
Diffstat (limited to 'cmd/podman/create_cli_test.go')
-rw-r--r--cmd/podman/create_cli_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/create_cli_test.go b/cmd/podman/create_cli_test.go
index fa128c8e6..9db007ff3 100644
--- a/cmd/podman/create_cli_test.go
+++ b/cmd/podman/create_cli_test.go
@@ -47,7 +47,7 @@ func TestGetAllLabels(t *testing.T) {
}
func TestGetAllLabelsBadKeyValue(t *testing.T) {
- inLabels := []string{"ONE1", "TWO=2"}
+ inLabels := []string{"=badValue", "="}
fileLabels := []string{}
_, err := getAllLabels(fileLabels, inLabels)
assert.Error(t, err, assert.AnError)