On Tue, Mar 07, 2017 at 01:05:48PM +0100, Pino Toscano wrote:
On Monday, 6 March 2017 16:08:59 CET Richard W.M. Jones wrote:
> Test:
> - Bad SHA1 sum
> - Bad SHA256 sum
> - Invalid lines in manifest (x2)
> - Good checksum and manifest
>
> These tests were originally written by Tomáš Golembiovský. All I have
> done is to integrate them into the virt-v2v test suite.
> ---
> .gitignore | 1 +
> v2v/Makefile.am | 22 +++++++-
> v2v/test-v2v-i-ova-bad-sha1.sh | 66 +++++++++++++++++++++++
> v2v/test-v2v-i-ova-bad-sha256.sh | 66 +++++++++++++++++++++++
> v2v/test-v2v-i-ova-checksums.ovf | 95 +++++++++++++++++++++++++++++++++
> v2v/test-v2v-i-ova-good-checksums.sh | 64 ++++++++++++++++++++++
> v2v/test-v2v-i-ova-invalid-manifest1.sh | 65 ++++++++++++++++++++++
> v2v/test-v2v-i-ova-invalid-manifest2.sh | 64 ++++++++++++++++++++++
> 8 files changed, 442 insertions(+), 1 deletion(-)
> create mode 100755 v2v/test-v2v-i-ova-bad-sha1.sh
> create mode 100755 v2v/test-v2v-i-ova-bad-sha256.sh
> create mode 100644 v2v/test-v2v-i-ova-checksums.ovf
> create mode 100755 v2v/test-v2v-i-ova-good-checksums.sh
> create mode 100755 v2v/test-v2v-i-ova-invalid-manifest1.sh
> create mode 100755 v2v/test-v2v-i-ova-invalid-manifest2.sh
test-v2v-i-ova-good-checksums.sh seems a bit reduntant though -- IMHO
it'd be better to:
- add checksumming of .ovf files to all the tests
- verify no warnings were issued in one of the existing ova tests
That's correct, the other tests (test-v2v-i-ova-*.sh added by Tomáš)
already test SHA1 checksums and that there are no warnings or errors
from them.
Therefore I modified the test-v2v-i-ova-good-checksums.sh test so it
tests all of the supported checksum types (currently just SHA1 and
SHA256), so this test does now have a real purpose.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/