Skip to content

Commit

Permalink
Issue #107 Adding sshfs and smoke test that it is available in built ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
hferentschik authored and brgnepal committed Mar 8, 2017
1 parent e9c83c3 commit 5a1f02f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions centos-7.template
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -42,6 +43,7 @@ shim
syslinux
hyperv-daemons
cifs-utils
fuse-sshfs

#Packages to be removed
-aic94xx-firmware
Expand Down
1 change: 1 addition & 0 deletions rhel-7.template
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ syslinux
hyperv-daemons
cifs-utils
cdk-entitlements
fuse-sshfs

#Packages to be removed
-aic94xx-firmware
Expand Down
9 changes: 7 additions & 2 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 5a1f02f

Please sign in to comment.