test: Update inactive guest config on shutdown

This matches the expected behavior of state drivers such as QEMU.
This commit is contained in:
Cole Robinson 2009-11-03 16:42:02 -05:00
parent b712bfb46c
commit 4fbad2e049

View File

@ -473,6 +473,12 @@ static void
testDomainShutdownState(virDomainPtr domain,
virDomainObjPtr privdom)
{
if (privdom->newDef) {
virDomainDefFree(privdom->def);
privdom->def = privdom->newDef;
privdom->newDef = NULL;
}
privdom->state = VIR_DOMAIN_SHUTOFF;
privdom->def->id = -1;
domain->id = -1;