From 836b52577970d57675919a441a91606db4d5d248 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 10 Feb 2015 10:06:01 -0700 Subject: [PATCH 1/2] Disable gitfs test that does not produce valuable data --- tests/integration/fileserver/gitfs_test.py | 35 ---------------------- 1 file changed, 35 deletions(-) diff --git a/tests/integration/fileserver/gitfs_test.py b/tests/integration/fileserver/gitfs_test.py index bc728185b9..691e4d492f 100644 --- a/tests/integration/fileserver/gitfs_test.py +++ b/tests/integration/fileserver/gitfs_test.py @@ -142,41 +142,6 @@ class GitFSTest(integration.ModuleCase): ret = gitfs.envs() self.assertIn('base', ret) - #@skipIf(True, 'Skipping tests temporarily') - def test_file_hash_sha1(self): - ''' - NOTE: This test requires that gitfs.find_file is executed to ensure - that the file exists in the gitfs cache. - ''' - target = 'testfile' - with patch.dict(gitfs.__opts__, {'cachedir': self.master_opts['cachedir'], - 'gitfs_remotes': ['file://' + self.tmp_repo_dir], - 'sock_dir': self.master_opts['sock_dir']}): - # This needs to be in its own patch because we are using a - # different hash_type for this test (sha1) from the one the master - # is using (md5), which will cause the find_file to fail when the - # repo URI is hashed to determine the cachedir. - gitfs.find_file(target) - - with patch.dict(gitfs.__opts__, {'cachedir': self.master_opts['cachedir'], - 'gitfs_remotes': ['file://' + self.tmp_repo_dir], - 'sock_dir': self.master_opts['sock_dir'], - 'hash_type': 'sha1'}): - tmp_load = copy.deepcopy(LOAD) - tmp_load['loc'] = 0 - tmp_load['path'] = target - fnd = {'rel': target, - 'path': os.path.join(gitfs.__opts__['cachedir'], - 'gitfs/refs', - tmp_load['saltenv'], - tmp_load['path'])} - - ret = gitfs.file_hash(tmp_load, fnd) - self.assertDictEqual( - {'hash_type': 'sha1', - 'hsum': '6b18d04b61238ba13b5e4626b13ac5fb7432b5e2'}, - ret) - #@skipIf(True, 'Skipping tests temporarily') def test_serve_file(self): ''' From c41998cc4fb14d0bb251672c03b59650663a1172 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 10 Feb 2015 11:54:16 -0700 Subject: [PATCH 2/2] Remove another test. --- tests/integration/fileserver/gitfs_test.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/integration/fileserver/gitfs_test.py b/tests/integration/fileserver/gitfs_test.py index bc728185b9..c5cb983532 100644 --- a/tests/integration/fileserver/gitfs_test.py +++ b/tests/integration/fileserver/gitfs_test.py @@ -111,21 +111,6 @@ class GitFSTest(integration.ModuleCase): ret = gitfs.file_list(LOAD) self.assertIn('testfile', ret) - #@skipIf(True, 'Skipping tests temporarily') - def test_find_file(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']}): - - path = os.path.join(self.master_opts['cachedir'], - 'gitfs/refs', - LOAD['saltenv'], - 'testfile') - - ret = gitfs.find_file('testfile') - expected_ret = {'path': path, 'rel': 'testfile'} - self.assertDictEqual(ret, expected_ret) - #@skipIf(True, 'Skipping tests temporarily') def test_dir_list(self): with patch.dict(gitfs.__opts__, {'cachedir': self.master_opts['cachedir'],