[master 1/1] Test that LVM device is encrypted.

mulkieran installerbot-noreply at redhat.com
Wed Jun 3 18:22:44 UTC 2015


From: mulhern <amulhern at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 tests/kickstart_tests/encrypt-device.ks | 31 +++++++++++++++++++++++++++++++
 tests/kickstart_tests/encrypt-device.sh | 20 ++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 tests/kickstart_tests/encrypt-device.ks
 create mode 100755 tests/kickstart_tests/encrypt-device.sh

diff --git a/tests/kickstart_tests/encrypt-device.ks b/tests/kickstart_tests/encrypt-device.ks
new file mode 100644
index 0000000..72bd762
--- /dev/null
+++ b/tests/kickstart_tests/encrypt-device.ks
@@ -0,0 +1,31 @@
+url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/"
+install
+network --bootproto=dhcp
+
+bootloader --timeout=1
+zerombr
+clearpart --all --initlabel
+part pv.68 --asprimary --fstype="lvmpv" --ondisk=sda --size=7691
+part /boot --asprimary --fstype="ext4" --ondisk=sda --size=500
+volgroup vg01 --pesize=4096 pv.68
+logvol /  --fstype="ext4" --size=5000 --encrypted --name=root_lv --vgname=vg01 --passphrase=OntarioIsAProvince --label=root
+logvol /var  --fstype="ext4" --size=1000 --name=var_lv --vgname=vg01
+logvol swap  --fstype="swap" --size=1024 --name=swap_lv --vgname=vg01
+logvol /home  --fstype="ext4" --grow --size=1 --name=home_lv --vgname=vg01
+
+keyboard us
+lang en_US.UTF-8
+timezone America/New_York --utc
+rootpw testcase
+shutdown
+
+%packages --default
+%end
+
+%post
+if [ -z "$(blkid -t TYPE="crypto_LUKS")" ]; then
+    echo "no encrypted device found" > /root/RESULT
+else
+    echo SUCCESS > /root/RESULT
+fi
+%end
diff --git a/tests/kickstart_tests/encrypt-device.sh b/tests/kickstart_tests/encrypt-device.sh
new file mode 100755
index 0000000..dd45a93
--- /dev/null
+++ b/tests/kickstart_tests/encrypt-device.sh
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2015  Red Hat, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions of
+# the GNU General Public License v.2, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY expressed or implied, including the implied warranties 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.  Any Red Hat trademarks that are incorporated in the
+# source code or documentation are not subject to the GNU General Public
+# License and may only be used or replicated with the express permission of
+# Red Hat, Inc.
+#
+# Red Hat Author(s): Anne Mulhern <amulhern at redhat.com>
+
+. ${KSTESTDIR}/functions.sh


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/12f5fbd097c783b410516f213d632bc8bea42c04


More information about the anaconda-patches mailing list