Esempio n. 1
0
 def test_dir_singularity(self):
     """Working directory specified"""
     w = workdir(directory='foo')
     self.assertEqual(str(w), '%post\n    cd /\n    mkdir -p foo\n    cd foo')
Esempio n. 2
0
 def test_dir_docker(self):
     """Working directory specified"""
     w = workdir(directory='foo')
     self.assertEqual(str(w), 'WORKDIR foo')
Esempio n. 3
0
 def test_empty(self):
     """No workdir specified"""
     w = workdir()
     self.assertEqual(str(w), '')
Esempio n. 4
0
 def test_invalid_ctype(self):
     """Invalid container type specified"""
     w = workdir(directory='foo')
     with self.assertRaises(RuntimeError):
         str(w)
Esempio n. 5
0
 def test_dir_bash(self):
     """Working directory specified"""
     w = workdir(directory='foo')
     self.assertEqual(str(w), '')