mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
builder: Add test of virt-index-validate.
This commit is contained in:
@@ -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
|
||||
|
||||
8
builder/test-virt-index-validate-bad-1
Normal file
8
builder/test-virt-index-validate-bad-1
Normal 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.
|
||||
0
builder/test-virt-index-validate-good-1
Normal file
0
builder/test-virt-index-validate-good-1
Normal file
2
builder/test-virt-index-validate-good-2
Normal file
2
builder/test-virt-index-validate-good-2
Normal file
@@ -0,0 +1,2 @@
|
||||
# All lines commented out.
|
||||
# [foo]
|
||||
24
builder/test-virt-index-validate.sh
Executable file
24
builder/test-virt-index-validate.sh
Executable 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
|
||||
Reference in New Issue
Block a user