mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Fix minor bugs on GOCA tests (#2979)
This commit is contained in:
parent
ef0422030e
commit
f676656485
@ -156,12 +156,13 @@ func TestVirtualRouter(t *testing.T){
|
|||||||
|
|
||||||
vr.Info()
|
vr.Info()
|
||||||
|
|
||||||
actualNet, err := vr.Template.Dynamic.GetContentByName("NETWORK")
|
if len(vr.Template.NIC) == 0{
|
||||||
if err != nil {
|
t.Errorf("Test failed, can't retrieve '%s', error: %s", "NIC", err.Error())
|
||||||
t.Errorf("Test failed, can't retrieve '%s', error: %s", "NETWORK", err.Error())
|
|
||||||
} else {
|
} else {
|
||||||
if actualNet != "go-net" {
|
actualNetName, _ := vr.Template.NIC[0].Dynamic.GetContentByName("NETWORK")
|
||||||
t.Errorf("Test failed, expected: '%s', got: '%s'", "go-net", actualNet)
|
|
||||||
|
if actualNetName != "go-net" {
|
||||||
|
t.Errorf("Test failed, expected: '%s', got: '%s'", "go-net", actualNetName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,12 +203,8 @@ func TestVirtualRouter(t *testing.T){
|
|||||||
vr.Info()
|
vr.Info()
|
||||||
|
|
||||||
actualLock = vr.LockInfos
|
actualLock = vr.LockInfos
|
||||||
if actualLock == nil {
|
if actualLock != nil {
|
||||||
t.Errorf("Test failed, expected: '%s', got: '%s'", "LockInfos", "nil")
|
t.Errorf("Test failed, expected: '%s', got: '%s'", "nil", "LockInfos")
|
||||||
}
|
|
||||||
// XXX is it useful ? fail at previous part ?
|
|
||||||
if actualLock.Locked != 0 {
|
|
||||||
t.Errorf("Test failed, expected: '%d', got: '%d'", 0, actualLock.Locked)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Delete VirtualRouter
|
//Delete VirtualRouter
|
||||||
|
Loading…
Reference in New Issue
Block a user