Exemple #1
0
 def test_file_list(self):
     ret = gitfs.file_list(LOAD)
     self.assertIn('testfile', ret)
     self.assertIn(UNICODE_FILENAME, ret)
     # This function does not use os.sep, the Salt fileserver uses the
     # forward slash, hence it being explicitly used to join here.
     self.assertIn('/'.join((UNICODE_DIRNAME, 'foo.txt')), ret)
Exemple #2
0
 def test_file_list(self):
     with patch.dict(gitfs.__opts__, {'cachedir': self.master_opts['cachedir'],
                                      'gitfs_remotes': ['file://' + self.tmp_repo_dir],
                                      'sock_dir': self.master_opts['sock_dir'],
                                      '__role': self.master_opts['__role']}):
         ret = gitfs.file_list(LOAD)
         self.assertIn('testfile', ret)
 def test_file_list_fallback(self):
     with patch.dict(gitfs.__opts__, {"gitfs_fallback": "master"}):
         gitfs.update()
         ret = gitfs.file_list({"saltenv": "notexisting"})
         self.assertIn("testfile", ret)
         self.assertIn(UNICODE_FILENAME, ret)
         # This function does not use os.sep, the Salt fileserver uses the
         # forward slash, hence it being explicitly used to join here.
         self.assertIn("/".join((UNICODE_DIRNAME, "foo.txt")), ret)
Exemple #4
0
 def test_file_list(self):
     with patch.dict(
             gitfs.__opts__, {
                 'cachedir': self.master_opts['cachedir'],
                 'gitfs_remotes': ['file://' + self.tmp_repo_git],
                 'sock_dir': self.master_opts['sock_dir']
             }):
         ret = gitfs.file_list(LOAD)
         self.assertIn('testfile', ret)
Exemple #5
0
 def test_file_list(self):
     ret = gitfs.file_list(LOAD)
     self.assertIn('testfile', ret)