mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-22 16:54:25 +01:00
hypervisor: cleanup valid method
The boolean return value is not necessary. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
@@ -107,9 +107,12 @@ func TestNewHypervisorFromUnknownHypervisorType(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testHypervisorConfigValid(t *testing.T, hypervisorConfig *HypervisorConfig, expected bool) {
|
||||
ret, _ := hypervisorConfig.valid()
|
||||
if ret != expected {
|
||||
func testHypervisorConfigValid(t *testing.T, hypervisorConfig *HypervisorConfig, success bool) {
|
||||
err := hypervisorConfig.valid()
|
||||
if success && err != nil {
|
||||
t.Fatal()
|
||||
}
|
||||
if !success && err == nil {
|
||||
t.Fatal()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user