mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
ut: fix hypervisor path
Otherwise UT fails when there is no file at defaultHypervisorPath. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
parent
ce288652d5
commit
7af8e6c641
@ -469,6 +469,8 @@ func TestMinimalRuntimeConfig(t *testing.T) {
|
|||||||
|
|
||||||
shimPath := path.Join(dir, "shim")
|
shimPath := path.Join(dir, "shim")
|
||||||
proxyPath := path.Join(dir, "proxy")
|
proxyPath := path.Join(dir, "proxy")
|
||||||
|
hypervisorPath := path.Join(dir, "hypervisor")
|
||||||
|
defaultHypervisorPath = hypervisorPath
|
||||||
|
|
||||||
runtimeMinimalConfig := `
|
runtimeMinimalConfig := `
|
||||||
# Runtime configuration file
|
# Runtime configuration file
|
||||||
@ -503,6 +505,11 @@ func TestMinimalRuntimeConfig(t *testing.T) {
|
|||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = createEmptyFile(hypervisorPath)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
_, config, err = loadConfiguration(configPath, false)
|
_, config, err = loadConfiguration(configPath, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user