Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
ut: fix hypervisor path
Browse files Browse the repository at this point in the history
Otherwise UT fails when there is no file at defaultHypervisorPath.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
  • Loading branch information
bergwolf committed Sep 6, 2018
1 parent ce28865 commit 7af8e6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ func TestMinimalRuntimeConfig(t *testing.T) {

shimPath := path.Join(dir, "shim")
proxyPath := path.Join(dir, "proxy")
hypervisorPath := path.Join(dir, "hypervisor")
defaultHypervisorPath = hypervisorPath

runtimeMinimalConfig := `
# Runtime configuration file
Expand Down Expand Up @@ -503,6 +505,11 @@ func TestMinimalRuntimeConfig(t *testing.T) {
t.Error(err)
}

err = createEmptyFile(hypervisorPath)
if err != nil {
t.Error(err)
}

_, config, err = loadConfiguration(configPath, false)
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 7af8e6c

Please sign in to comment.