From 5a1f02f6ba1f678958cdb2008e85f07fe41c0e81 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Tue, 28 Feb 2017 22:26:46 +0100 Subject: [PATCH] Issue #107 Adding sshfs and smoke test that it is available in built ISO --- Makefile | 4 ++-- centos-7.template | 2 ++ rhel-7.template | 1 + tests/test.py | 9 +++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f1d2227..9877944 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ rhel_iso: iso_creation .PHONY: iso_creation iso_creation: init - handle_user_data='$(HANDLE_USER_DATA)' cert_gen='$(CERT_GEN)' version='$(VERSION)' build_id='$(GITTAG)-$(TODAY)-$(BUILD_ID)' \ + @handle_user_data='$(HANDLE_USER_DATA)' cert_gen='$(CERT_GEN)' version='$(VERSION)' build_id='$(GITTAG)-$(TODAY)-$(BUILD_ID)' \ envsubst < $(KICKSTART_TEMPLATE) > $(BUILD_DIR)/$(KICKSTART_FILE) cd $(BUILD_DIR); sudo livecd-creator --config $(BUILD_DIR)/$(KICKSTART_FILE) --logfile=$(BUILD_DIR)/livecd-creator.log --fslabel $(ISO_NAME) # http://askubuntu.com/questions/153833/why-cant-i-mount-the-ubuntu-12-04-installer-isos-in-mac-os-x @@ -48,7 +48,7 @@ iso_creation: init .PHONY: check_env check_env: - if test "$(rhel_tree_url)" = ""; then \ + @if test "$(rhel_tree_url)" = ""; then \ echo "rhel_tree_url is undefined, Please check README"; \ exit 1; \ elif test "$(base_repo_url)" = ""; then \ diff --git a/centos-7.template b/centos-7.template index 52169e4..7712e17 100644 --- a/centos-7.template +++ b/centos-7.template @@ -20,6 +20,7 @@ part / --fstype="ext4" --size=10240 repo --name=base --baseurl=http://mirror.centos.org/centos/7/os/x86_64/ repo --name=updates --baseurl=http://mirror.centos.org/centos/7/updates/x86_64/ repo --name=extras --baseurl=http://mirror.centos.org/centos/7/extras/x86_64/ +repo --name=atomic --baseurl=http://mirror.centos.org/centos/7/atomic/x86_64/adb/ shutdown @@ -42,6 +43,7 @@ shim syslinux hyperv-daemons cifs-utils +fuse-sshfs #Packages to be removed -aic94xx-firmware diff --git a/rhel-7.template b/rhel-7.template index 3335082..4146246 100644 --- a/rhel-7.template +++ b/rhel-7.template @@ -42,6 +42,7 @@ syslinux hyperv-daemons cifs-utils cdk-entitlements +fuse-sshfs #Packages to be removed -aic94xx-firmware diff --git a/tests/test.py b/tests/test.py index 0830ffd..7fecf69 100644 --- a/tests/test.py +++ b/tests/test.py @@ -56,11 +56,16 @@ def test_docker_env_evaluable(self): output = self.execute_test({ 'cmd': cmd }) self.check_data_evaluable(output.rstrip()) - def test_cifs_mount(self): + def test_cifs_installed(self): cmd = self.bin_dir + "minishift ssh 'sudo /sbin/mount.cifs -V'" output = self.execute_test({ 'cmd': cmd }) self.assertEqual('mount.cifs version: 6.2', output.rstrip()) + def test_sshfs_installed(self): + cmd = self.bin_dir + "minishift ssh 'sudo sshfs -V'" + output = self.execute_test({ 'cmd': cmd }) + self.assertRegexpMatches(output.rstrip(), r'.*SSHFS version 2\.5.*') + def test_stopping_vm(self): ''' Test stopping machine ''' cmd = self.bin_dir + "minishift stop" @@ -78,7 +83,7 @@ def test_swapspace(self): ''' Test if swap space is available on restart ''' cmd = self.bin_dir + "minishift start" self.execute_test({ 'cmd': cmd }) - + # Check swap space cmd = self.bin_dir + "minishift ssh \"echo `free | tail -n 1 | awk '{print $2}'`\"" self.log.info("Executing command : %s" % cmd)