mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
tests/int: amend runc exec --env test
This tests checks that "runc exec --env VAR=VAR ..." actually appends VAR=VAL to the exec's environment. Add additional checks that: - process.env from config.json is also inherited; - HOME is set. Those checks do not reveal any new issues. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -100,8 +100,12 @@ function teardown() {
|
||||
|
||||
runc exec --env RUNC_EXEC_TEST=true test_busybox env
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
[[ ${output} == *"RUNC_EXEC_TEST=true"* ]]
|
||||
[[ "$output" == *"RUNC_EXEC_TEST=true"* ]]
|
||||
# Env should inherit what's in config.json.
|
||||
[[ "$output" == *'PATH='* ]]
|
||||
[[ "$output" == *'TERM='* ]]
|
||||
# Env should have HOME set from container's /etc/passwd.
|
||||
[[ "$output" == *'HOME='* ]]
|
||||
}
|
||||
|
||||
@test "runc exec --user" {
|
||||
|
||||
Reference in New Issue
Block a user