Beispiel #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)
Beispiel #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)
Beispiel #3
0
 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)
Beispiel #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)
Beispiel #5
0
 def test_file_list(self):
     ret = gitfs.file_list(LOAD)
     self.assertIn('testfile', ret)