mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
executor_linux_test test PATH lookup inside the container
This commit is contained in:
@@ -179,6 +179,22 @@ func TestExecutor_EscapeContainer(t *testing.T) {
|
||||
_, err := executor.Launch(execCmd)
|
||||
require.Error(err)
|
||||
require.Regexp("^file /bin/kill not found under path", err)
|
||||
|
||||
// Bare files are looked up using the system path, inside the container
|
||||
allocDir.Destroy()
|
||||
testExecCmd = testExecutorCommandWithChroot(t)
|
||||
execCmd, allocDir = testExecCmd.command, testExecCmd.allocDir
|
||||
execCmd.Cmd = "kill"
|
||||
_, err = executor.Launch(execCmd)
|
||||
require.Error(err)
|
||||
require.Regexp("^file kill not found under path", err)
|
||||
|
||||
allocDir.Destroy()
|
||||
testExecCmd = testExecutorCommandWithChroot(t)
|
||||
execCmd, allocDir = testExecCmd.command, testExecCmd.allocDir
|
||||
execCmd.Cmd = "echo"
|
||||
_, err = executor.Launch(execCmd)
|
||||
require.NoError(err)
|
||||
}
|
||||
|
||||
func TestExecutor_ClientCleanup(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user