Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: tests/gclient_test.py

Issue 195913002: gclient: in managed mode, warn if .gclient has a mismatched URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix smoketests Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« gclient_scm.py ('K') | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_test.py
diff --git a/tests/gclient_test.py b/tests/gclient_test.py
index b758718cccb1d730b6c0a364cccee460dc827f10..18876cc86e8e1b8b31d80a083702b9306a279309 100755
--- a/tests/gclient_test.py
+++ b/tests/gclient_test.py
@@ -44,6 +44,13 @@ class SCMMock(object):
def FullUrlForRelativeUrl(self, url):
return self.url + url
+ # pylint: disable=R0201
+ def DoesRemoteURLMatch(self):
+ return True
+
+ def GetActualRemoteURL(self):
+ return self.url
+
class GclientTest(trial_dir.TestCase):
def setUp(self):
@@ -250,7 +257,7 @@ class GclientTest(trial_dir.TestCase):
topdir = self.root_dir
gclient_fn = os.path.join(topdir, '.gclient')
fh = open(gclient_fn, 'w')
- print >> fh, 'solutions = [{"name":"top","url":"svn://svn.top.com/top"}]'
+ print >> fh, 'solutions = [{"name":"top","url":"svn://example.com/top"}]'
fh.close()
subdir_fn = os.path.join(topdir, 'top')
os.mkdir(subdir_fn)
@@ -281,9 +288,9 @@ class GclientTest(trial_dir.TestCase):
gclient_fn = os.path.join(topdir, '.gclient')
fh = open(gclient_fn, 'w')
extra_hooks = [{'name': 'append', 'pattern':'.', 'action':['supercmd']}]
- print >> fh, ('solutions = [{"name":"top","url":"svn://svn.top.com/top",'
+ print >> fh, ('solutions = [{"name":"top","url":"svn://example.com/top",'
'"custom_hooks": %s},' ) % repr(extra_hooks + [{'name': 'skip'}])
- print >> fh, '{"name":"bottom","url":"svn://svn.top.com/bottom"}]'
+ print >> fh, '{"name":"bottom","url":"svn://example.com/bottom"}]'
fh.close()
subdir_fn = os.path.join(topdir, 'top')
os.mkdir(subdir_fn)
« gclient_scm.py ('K') | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698