builder: Add test of virt-index-validate.

This commit is contained in:
Richard W.M. Jones
2014-04-03 08:58:46 +01:00
parent 358c6571d0
commit d268cfd13e
5 changed files with 41 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ EXTRA_DIST = \
test-virt-builder.sh \
test-virt-builder-list.sh \
test-virt-builder-planner.sh \
test-virt-index-validate.sh \
test-virt-index-validate-bad-1 \
test-virt-index-validate-good-1 \
test-virt-index-validate-good-2 \
virt-builder.pod \
virt-index-validate.pod
@@ -226,7 +230,9 @@ fedora.qcow2.xz: fedora.qcow2
xz --best --block-size=16777216 -c $< > $@-t
mv $@-t $@
TESTS = test-virt-builder-list.sh
TESTS = \
test-virt-builder-list.sh \
test-virt-index-validate.sh
if ENABLE_APPLIANCE
TESTS += test-virt-builder.sh

View File

@@ -0,0 +1,8 @@
name=Phony Fedora
arch=x86_64
file=fedora.xz
format=raw
size=1073741824
expand=/dev/sda2
lvexpand=/dev/VG/Root
notes=Phony Fedora look-alike used for testing.

View File

View File

@@ -0,0 +1,2 @@
# All lines commented out.
# [foo]

View File

@@ -0,0 +1,24 @@
#!/bin/bash -
# test virt-index-validate
# Copyright (C) 2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
export LANG=C
set -e
! $VG ./virt-index-validate test-virt-index-validate-bad-1
$VG ./virt-index-validate test-virt-index-validate-good-1
$VG ./virt-index-validate test-virt-index-validate-good-2