Fix test removing all allocs
This commit is contained in:
parent
335867644b
commit
5e33eafb80
@ -226,13 +226,9 @@ func TestNetwork_SetConfig(t *testing.T) {
|
|||||||
networkConfig = secondus.getConfig(t)
|
networkConfig = secondus.getConfig(t)
|
||||||
|
|
||||||
prevHost = secondus.getHostsByName(t)[secondus.hostName]
|
prevHost = secondus.getHostsByName(t)[secondus.hostName]
|
||||||
removedAlloc = networkConfig.Storage.Allocations[0]
|
|
||||||
removedRole = allocsToRoles(
|
removedRole = allocsToRoles(
|
||||||
secondus.hostName, prevHost.Garage.Instances,
|
secondus.hostName, prevHost.Garage.Instances,
|
||||||
)[0]
|
)[0]
|
||||||
removedGarageInst = daecommon.BootstrapGarageHostForAlloc(
|
|
||||||
prevHost, removedAlloc,
|
|
||||||
)
|
|
||||||
|
|
||||||
primusGarageAdminClient = primus.garageAdminClient(t)
|
primusGarageAdminClient = primus.garageAdminClient(t)
|
||||||
)
|
)
|
||||||
@ -246,8 +242,7 @@ func TestNetwork_SetConfig(t *testing.T) {
|
|||||||
assert.True(t, ok)
|
assert.True(t, ok)
|
||||||
|
|
||||||
allocs := newHost.HostConfigured.Garage.Instances
|
allocs := newHost.HostConfigured.Garage.Instances
|
||||||
assert.Len(t, allocs, 3)
|
assert.Empty(t, allocs)
|
||||||
assert.NotContains(t, allocs, removedGarageInst)
|
|
||||||
|
|
||||||
t.Log("Checking that garage layout still contains the old allocation")
|
t.Log("Checking that garage layout still contains the old allocation")
|
||||||
layout, err := primusGarageAdminClient.GetLayout(h.ctx)
|
layout, err := primusGarageAdminClient.GetLayout(h.ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user