forked from vagrant-libvirt/vagrant-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use equivalent-xml to compare xml (vagrant-libvirt#1564)
Using diffy alone is insufficient to spot when the XML returned by libvirt for the changes applied is equivalent but formatted differently. When libvirt returns slightly differently formatted XML corresponding to what changes were actually applied, it can result in an error being assumed to have happened when the update actually worked as expected. Equivalent-xml handles detecting XML documents as being identical, therefore switching to using it instead of diffy should produce more reliable results, while retaining diffy for better formatted diffs should an issue occur is useful. Fixes: vagrant-libvirt#1556
- Loading branch information
1 parent
9f31650
commit d7de5e4
Showing
4 changed files
with
83 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
spec/unit/action/start_domain_spec/default_with_different_formatting.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<domain xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' type=''> | ||
<name/> | ||
<title/> | ||
<description/> | ||
<uuid/> | ||
<memory/> | ||
<vcpu>1</vcpu> | ||
<cpu check="none" mode="host-model"> | ||
|
||
|
||
</cpu> | ||
<os> | ||
<type>hvm</type> | ||
<kernel/> | ||
<initrd/> | ||
<cmdline/> | ||
</os> | ||
<features> | ||
<acpi/> | ||
<apic/> | ||
<pae/> | ||
</features> | ||
<clock offset='utc'/> | ||
<devices> | ||
<serial type='pty'> | ||
<target port='0'/> | ||
</serial> | ||
<console type='pty'> | ||
<target port='0'/> | ||
</console> | ||
<input bus='ps2' type='mouse'/> | ||
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc'/> | ||
<video> | ||
<model heads='1' type='cirrus' vram='16384'/> | ||
</video> | ||
</devices> | ||
</domain> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters