mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[auth] Add test for overwriting global SSO rewrite rules
Sanity check for attached bug Bug: b/390219533 Change-Id: I788e6beaa7f838568714b98b6f7923d455e6e3a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6178580 Commit-Queue: Allen Li <ayatane@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
@@ -178,6 +178,24 @@ class TestConfigChanger(unittest.TestCase):
|
||||
}
|
||||
self.assertEqual(self.global_state, want)
|
||||
|
||||
def test_apply_global_chain_sso_new(self):
|
||||
git_auth.ConfigChanger(
|
||||
mode=git_auth.ConfigMode.NEW_AUTH_SSO,
|
||||
remote_url=
|
||||
'https://chromium.googlesource.com/chromium/tools/depot_tools.git',
|
||||
).apply_global('/some/fake/dir')
|
||||
git_auth.ConfigChanger(
|
||||
mode=git_auth.ConfigMode.NEW_AUTH,
|
||||
remote_url=
|
||||
'https://chromium.googlesource.com/chromium/tools/depot_tools.git',
|
||||
).apply_global('/some/fake/dir')
|
||||
want = {
|
||||
'protocol.sso.allow': ['always'],
|
||||
'credential.https://chromium.googlesource.com/.helper':
|
||||
['', 'luci'],
|
||||
}
|
||||
self.assertEqual(self.global_state, want)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(
|
||||
|
||||
Reference in New Issue
Block a user