diff options
| author | Josip Sokcevic <sokcevic@google.com> | 2024-12-03 21:29:01 +0000 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-12-03 22:27:56 +0000 |
| commit | cf411b3f03c3bd6001701136be5a874a85f1dc91 (patch) | |
| tree | d4e78902f1cfb5664622e071fe82926bf7106efb /tests/test_wrapper.py | |
| parent | 1feecbd91eac1b4a30e74f5356b61607d13ce89f (diff) | |
| download | git-repo-cf411b3f03c3bd6001701136be5a874a85f1dc91.tar.gz | |
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 <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Tested-by: Josip Sokcevic <sokcevic@google.com>
Diffstat (limited to 'tests/test_wrapper.py')
| -rw-r--r-- | tests/test_wrapper.py | 75 |
1 files changed, 1 insertions, 74 deletions
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): | |||
| 72 | 72 | ||
| 73 | def test_init_parser(self): | 73 | def test_init_parser(self): |
| 74 | """Make sure 'init' GetParser works.""" | 74 | """Make sure 'init' GetParser works.""" |
| 75 | parser = self.wrapper.GetParser(gitc_init=False) | 75 | parser = self.wrapper.GetParser() |
| 76 | opts, args = parser.parse_args([]) | 76 | opts, args = parser.parse_args([]) |
| 77 | self.assertEqual([], args) | 77 | self.assertEqual([], args) |
| 78 | self.assertIsNone(opts.manifest_url) | 78 | self.assertIsNone(opts.manifest_url) |
| 79 | 79 | ||
| 80 | def test_gitc_init_parser(self): | ||
| 81 | """Make sure 'gitc-init' GetParser raises.""" | ||
| 82 | with self.assertRaises(SystemExit): | ||
| 83 | self.wrapper.GetParser(gitc_init=True) | ||
| 84 | |||
| 85 | def test_get_gitc_manifest_dir_no_gitc(self): | ||
| 86 | """ | ||
| 87 | Test reading a missing gitc config file | ||
| 88 | """ | ||
| 89 | self.wrapper.GITC_CONFIG_FILE = fixture("missing_gitc_config") | ||
| 90 | val = self.wrapper.get_gitc_manifest_dir() | ||
| 91 | self.assertEqual(val, "") | ||
| 92 | |||
| 93 | def test_get_gitc_manifest_dir(self): | ||
| 94 | """ | ||
| 95 | Test reading the gitc config file and parsing the directory | ||
| 96 | """ | ||
| 97 | self.wrapper.GITC_CONFIG_FILE = fixture("gitc_config") | ||
| 98 | val = self.wrapper.get_gitc_manifest_dir() | ||
| 99 | self.assertEqual(val, "/test/usr/local/google/gitc") | ||
| 100 | |||
| 101 | def test_gitc_parse_clientdir_no_gitc(self): | ||
| 102 | """ | ||
| 103 | Test parsing the gitc clientdir without gitc running | ||
| 104 | """ | ||
| 105 | self.wrapper.GITC_CONFIG_FILE = fixture("missing_gitc_config") | ||
| 106 | self.assertEqual(self.wrapper.gitc_parse_clientdir("/something"), None) | ||
| 107 | self.assertEqual( | ||
| 108 | self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test"), "test" | ||
| 109 | ) | ||
| 110 | |||
| 111 | def test_gitc_parse_clientdir(self): | ||
| 112 | """ | ||
| 113 | Test parsing the gitc clientdir | ||
| 114 | """ | ||
| 115 | self.wrapper.GITC_CONFIG_FILE = fixture("gitc_config") | ||
| 116 | self.assertEqual(self.wrapper.gitc_parse_clientdir("/something"), None) | ||
| 117 | self.assertEqual( | ||
| 118 | self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test"), "test" | ||
| 119 | ) | ||
| 120 | self.assertEqual( | ||
| 121 | self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test/"), "test" | ||
| 122 | ) | ||
| 123 | self.assertEqual( | ||
| 124 | self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/test/extra"), | ||
| 125 | "test", | ||
| 126 | ) | ||
| 127 | self.assertEqual( | ||
| 128 | self.wrapper.gitc_parse_clientdir( | ||
| 129 | "/test/usr/local/google/gitc/test" | ||
| 130 | ), | ||
| 131 | "test", | ||
| 132 | ) | ||
| 133 | self.assertEqual( | ||
| 134 | self.wrapper.gitc_parse_clientdir( | ||
| 135 | "/test/usr/local/google/gitc/test/" | ||
| 136 | ), | ||
| 137 | "test", | ||
| 138 | ) | ||
| 139 | self.assertEqual( | ||
| 140 | self.wrapper.gitc_parse_clientdir( | ||
| 141 | "/test/usr/local/google/gitc/test/extra" | ||
| 142 | ), | ||
| 143 | "test", | ||
| 144 | ) | ||
| 145 | self.assertEqual( | ||
| 146 | self.wrapper.gitc_parse_clientdir("/gitc/manifest-rw/"), None | ||
| 147 | ) | ||
| 148 | self.assertEqual( | ||
| 149 | self.wrapper.gitc_parse_clientdir("/test/usr/local/google/gitc/"), | ||
| 150 | None, | ||
| 151 | ) | ||
| 152 | |||
| 153 | 80 | ||
| 154 | class SetGitTrace2ParentSid(RepoWrapperTestCase): | 81 | class SetGitTrace2ParentSid(RepoWrapperTestCase): |
| 155 | """Check SetGitTrace2ParentSid behavior.""" | 82 | """Check SetGitTrace2ParentSid behavior.""" |
