Skip to content

Commit 2406bde

Browse files
author
efajardo
committed
removed typos
1 parent c9f8c55 commit 2406bde

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

osgtest/tests/test_38_cvmfs.py

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ class TestCvmfs(osgunittest.OSGTestCase):
1111
core.config['cvmfs.debug-dirs'] = []
1212

1313
def mountSingularityCVMFSRepo(self, repo):
14-
command = ('mkdir', '-p', /cvmfs + repo)
15-
status, stdout, stderr = core.system(command, False)
16-
if status != 0:
17-
self.fail("failed to mkdir /cvmfs/%s" % repo)
14+
command = ('mkdir', '-p', '/cvmfs/' + repo)
15+
core.check_system(command, 'Manually creating cvmfs dir')
1816

1917
command = ('mount', '-t', 'cvmfs', 'repo', '/cvmfs/' + repo)
20-
status, stdout, stderr = core.system(command, False)
21-
if status != 0:
22-
self.fail("failed to mount: %s, error: %s" % (repo,stdout))
18+
core.check_system(command, 'Manually mounting cvmfs singularity repo')
2319

2420
def debug_cvmfs(self, repo):
2521
temp_dir = tempfile.mkdtemp()
@@ -113,28 +109,16 @@ def test_03_oasis_config(self):
113109
def test_04_singularity(self):
114110
core.skip_ok_unless_installed('singularity-runtime')
115111
core.skip_ok_unless_installed('cvmfs')
112+
core.skip_ok_unless_installed('cvmfs-keys', by_dependency=True)
116113
singularity_repo = 'singularity.opensciencegrid.org'
117114
if core.el_release() <= 6:
118115
self.mountSingularityCVMFSRepo(singularity_repo)
119-
core.state['cvmfs.mounted'] = False
120-
121-
command = ('ls', '/cvmfs')
122-
status, stdout, stderr = core.system(command, False)
123-
file_exists = os.path.exists('/cvmfs')
124-
self.assert_(file_exists, 'Cvmfs mount point missing')
125-
core.state['cvmfs.mounted'] = True
126-
127116
command = ('ls', '/cvmfs/' + singularity_repo)
128-
status, stdout, stderr = core.system(command, False)
129-
130-
# If the previous command failed, output better debug info
131-
if status != 0:
132-
self.fail("failed to find /cvmfs/%s" % singularity_repo)
133-
117+
core.check_system(command, "testing cvmfs access to singularity repo")
118+
134119
command = ('ls', self.__cvmfs_image)
135-
status, stdout, stderr = core.system(command, False)
136-
self.assert_(file_exists, 'cvfms image missing')
120+
core.check_system(command, "testing cvmfs access to singularity image")
121+
137122
command= ('singularity', 'exec', '--bind', '/cvmfs', self.__cvmfs_image, 'echo', 'working singularity image')
138-
status, stdout, stderr = core.system(command, False)
139-
fail = core.diagnose('singularity checking a file', command, status, stdout, stderr)
140-
self.assertEqual(status, 0, fail)
123+
core.check_system(command, "'singularity checking a file")
124+

0 commit comments

Comments
 (0)