From cf411b3f03c3bd6001701136be5a874a85f1dc91 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Tue, 3 Dec 2024 21:29:01 +0000 Subject: Remove gitc support from repo gitc is no longer available. Change-Id: I0cbfdf936832f2cdd4876104ae3cc5a6e26154e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/444841 Reviewed-by: Gavin Mak Commit-Queue: Josip Sokcevic Tested-by: Josip Sokcevic --- tests/test_wrapper.py | 75 +-------------------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) (limited to 'tests/test_wrapper.py') diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index ea7a8b4d..8bebdf80 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -72,84 +72,11 @@ class RepoWrapperUnitTest(RepoWrapperTestCase): def test_init_parser(self): """Make sure 'init' GetParser works.""" - parser = self.wrapper.GetParser(gitc_init=False) + parser = self.wrapper.GetParser() opts, args = parser.parse_args([]) self.assertEqual([], args) self.assertIsNone(opts.manifest_url) - def test_gitc_init_parser(self): - """Make sure 'gitc-init' GetParser raises.""" - with self.assertRaises(SystemExit): - self.wrapper.GetParser(gitc_init=True) - - def test_get_gitc_manifest_dir_no_gitc(self): - """ - Test reading a missing gitc config file - """ - self.wrapper.GITC_CONFIG_FILE = fixture("missing_gitc_config") - val = self.wrapper.get_gitc_manifest_dir() - self.assertEqual(val, "") - - def test_get_gitc_manifest_dir(self): - """ - Test reading the gitc config file and parsing the directory - """ - self.wrapper.GITC_CONFIG_FILE = fixture("gitc_config") - val = self.wrapper.get_gitc_manifest_dir() - self.assertEqual(val, "/test/usr/local/google/gitc") - - def test_gitc_parse_clientdir_no_gitc(self): - """ - Test parsing the gitc clientdir without gitc running - """ - self.wrapper.GITC_CONFIG_FILE = fixture("missing_gitc_config") - self.assertEqual(self.wrapper.gitc_parse_clientdir("/something"), None) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test"), "test" - ) - - def test_gitc_parse_clientdir(self): - """ - Test parsing the gitc clientdir - """ - self.wrapper.GITC_CONFIG_FILE = fixture("gitc_config") - self.assertEqual(self.wrapper.gitc_parse_clientdir("/something"), None) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test"), "test" - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test/"), "test" - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test/extra"), - "test", - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir( - "/test/usr/local/google/gitc/test" - ), - "test", - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir( - "/test/usr/local/google/gitc/test/" - ), - "test", - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir( - "/test/usr/local/google/gitc/test/extra" - ), - "test", - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/"), None - ) - self.assertEqual( - self.wrapper.gitc_parse_clientdir("/test/usr/local/google/gitc/"), - None, - ) - class SetGitTrace2ParentSid(RepoWrapperTestCase): """Check SetGitTrace2ParentSid behavior.""" -- cgit v1.2.3-54-g00ecf