summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-07-26 19:27:32 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-07-26 19:27:32 +0200
commitcb725d11ad80312d9654afaeb6a0906d914eaa66 (patch)
tree081f7c010a4ed413ca82f928b67f7f1a445f447d /tests
parenta95f415bb42be33e09b6109aa0a3faededeea792 (diff)
add unit test for "dm_crypt on top of lvm on top of raw" setup
Diffstat (limited to 'tests')
-rw-r--r--tests/runtime/automatic-dmcrypt-lvm-install-sda/install.sh2
-rw-r--r--tests/runtime/automatic-dmcrypt-lvm-install-sda/perform_test.sh17
-rw-r--r--tests/runtime/automatic-dmcrypt-lvm-install-sda/profile22
-rw-r--r--tests/runtime/automatic-dmcrypt-lvm-install-sda/setup_test.sh6
4 files changed, 47 insertions, 0 deletions
diff --git a/tests/runtime/automatic-dmcrypt-lvm-install-sda/install.sh b/tests/runtime/automatic-dmcrypt-lvm-install-sda/install.sh
new file mode 100644
index 0000000..8b7b2db
--- /dev/null
+++ b/tests/runtime/automatic-dmcrypt-lvm-install-sda/install.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+aif -p automatic -c /usr/share/aif/tests/runtime/automatic-dmcrypt-lvm-install-sda/profile -d \ No newline at end of file
diff --git a/tests/runtime/automatic-dmcrypt-lvm-install-sda/perform_test.sh b/tests/runtime/automatic-dmcrypt-lvm-install-sda/perform_test.sh
new file mode 100644
index 0000000..4066922
--- /dev/null
+++ b/tests/runtime/automatic-dmcrypt-lvm-install-sda/perform_test.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+source /usr/share/aif/tests/lib/framework-runtime
+
+aiftest swap 19
+aiftest lvm-lv mypool root '800.00 MB'
+aiftest mount '/dev/mapper/mypool-rootcrypt on / type xfs (rw)'
+for i in /etc/ / /root/ /home/ /var/
+do
+ aiftest file "$i"test_file
+done
+aiftest file /usr/bin/ssh
+aiftest nofile /sbin/mkfs.reiserfs
+aiftest nopackage sudo
+aiftest ping 2 archlinux.org
+
+aiftest-done
diff --git a/tests/runtime/automatic-dmcrypt-lvm-install-sda/profile b/tests/runtime/automatic-dmcrypt-lvm-install-sda/profile
new file mode 100644
index 0000000..d98cc89
--- /dev/null
+++ b/tests/runtime/automatic-dmcrypt-lvm-install-sda/profile
@@ -0,0 +1,22 @@
+SOURCE=cd
+FILE_URL=file:///src/core/pkg
+SYNC_URL=
+
+RUNTIME_REPOSITORIES=
+RUNTIME_PACKAGES=
+
+# packages to install
+TARGET_GROUPS=base
+TARGET_PACKAGES_EXCLUDE='reiserfsprogs'
+TARGET_PACKAGES='openssh aif'
+
+# These variables are mandatory
+
+GRUB_DEVICE=/dev/sda
+PARTITIONS='/dev/sda 40:ext2:+ *:ext4'
+BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
+/dev/sda2 raw lvm-pv;yes;no_mountpoint;target;no_opts;no_label;no_params
+/dev/sda2+ lvm-pv no_label lvm-vg;yes;no_mountpoint;target;no_opts;mypool;/dev/sda2
+/dev/mapper/mypool lvm-vg mypool lvm-lv;yes;no_mountpoint;target;no_opts;root;800M
+/dev/mapper/mypool-root lvm-lv no_label dm_crypt;yes;no_mountpoint;target;no_opts;mypool-rootcrypt;-c_aes-xts-plain_-y_-s_512
+/dev/mapper/mypool-rootcrypt dm_crypt no_label xfs;yes;/;target;no_opts;no_label;no_params' \ No newline at end of file
diff --git a/tests/runtime/automatic-dmcrypt-lvm-install-sda/setup_test.sh b/tests/runtime/automatic-dmcrypt-lvm-install-sda/setup_test.sh
new file mode 100644
index 0000000..d5bc0d0
--- /dev/null
+++ b/tests/runtime/automatic-dmcrypt-lvm-install-sda/setup_test.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+for i in /etc/ / /root/ /home/ /var/
+do
+ touch /mnt${i}test_file
+done