Output XML elements to debug logs (#1345)

Because libvirt may handle updating the XML of components differently
across different versions and user environments, add the generated
contents to the debug log to assist in understanding what is happening
for different users.
This commit is contained in:
Darragh Bailey
2021-09-11 19:29:45 +01:00
committed by GitHub
parent 90e89de969
commit 0756362b84
11 changed files with 35 additions and 10 deletions

View File

@@ -30,6 +30,7 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
allow(connection).to receive(:servers).and_return(servers)
allow(servers).to receive(:get).and_return(domain)
allow(logger).to receive(:debug)
expect(logger).to receive(:info)
expect(ui).to_not receive(:error)
end
@@ -46,7 +47,6 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
it 'should execute without changing' do
allow(libvirt_domain).to receive(:undefine)
expect(logger).to_not receive(:debug)
expect(libvirt_domain).to receive(:autostart=)
expect(domain).to receive(:start)
@@ -118,7 +118,6 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
end
it 'should execute without changing' do
expect(logger).to_not receive(:debug)
expect(libvirt_domain).to receive(:autostart=)
expect(domain).to receive(:start)
@@ -138,7 +137,6 @@ describe VagrantPlugins::ProviderLibvirt::Action::StartDomain do
end
it 'should execute without changing' do
expect(logger).to_not receive(:debug)
expect(libvirt_domain).to receive(:autostart=)
expect(domain).to receive(:start)