mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 08:47:56 +00:00
tests: Fix fork/exec test error
Fixed `TestSandboxCreationFromConfigRollbackFromCreateSandbox` which requires that the hypervisor does not exist. Unfortunately, it does exist (as a fake test binary), but isn't executable meaning although the test failed (since an error is expected), rather than the expected `ENOENT` error, the test was logging a message similar to the following since the fake hypervisor exists with non-executable permissions: ``` Unable to launch /tmp/vc-tmp-526112270/hypervisor: fork/exec /tmp/vc-tmp-526112270/hypervisor: permission denied ``` Fixes: #1835. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
fcf9f9f6dd
commit
4968438992
@ -1530,6 +1530,10 @@ func TestSandboxCreationFromConfigRollbackFromCreateSandbox(t *testing.T) {
|
||||
Volumes: nil,
|
||||
Containers: nil,
|
||||
}
|
||||
|
||||
// Ensure hypervisor doesn't exist
|
||||
assert.NoError(os.Remove(hConf.HypervisorPath))
|
||||
|
||||
_, err := createSandboxFromConfig(ctx, sConf, nil)
|
||||
// Fail at createSandbox: QEMU path does not exist, it is expected. Then rollback is called
|
||||
assert.Error(err)
|
||||
|
Loading…
Reference in New Issue
Block a user