sciurus / vagrant-mutate

Convert vagrant boxes to work with different providers
MIT License
280 stars 41 forks source link

Tests fail, files not matching #59

Closed 3onyc closed 10 years ago

3onyc commented 10 years ago

qemu-img version: 2.1.0

Running the test suite I get

TESTS FAILED
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/kvm/box-disk1.img <snip>/test/expected_output/virtualbox/kvm/box-disk1.img
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/libvirt/box.img <snip>/test/expected_output/virtualbox/libvirt/box.img

Both failed tests produce the same diff:

--- actual
+++ expected
@@ -1 +1 @@
-0000000: 5146 49fb 0000 0003 0000 0000 0000 0000  QFI.............
+0000000: 5146 49fb 0000 0002 0000 0000 0000 0000  QFI.............
sciurus commented 10 years ago

That's interesting; what does qemu-img info report for _test/actualoutput/virtualbox/boxes/mutate-test/0/kvm/box-disk1.img

3onyc commented 10 years ago
image: box-disk1.img
file format: qcow2
virtual size: 4.0M (4194304 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

and qemu-img info for the expected box-disk1.img:

file format: qcow2
virtual size: 4.0M (4194304 bytes)
disk size: 148K
cluster_size: 65536
Format specific information:
    compat: 0.10
sciurus commented 10 years ago

Thanks for that. Probably the default compat has changed from 1.0 to 1.1. I'll fix this by switching the qemu-img calls to explicitly set compat to 1.1 and updating the expected test output.

3onyc commented 10 years ago
~$ test/test.rb
...
ALL TESTS PASSED

Thanks!