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

Unified Diff: appengine/components/components/config/common_test.py

Issue 2243923002: Refactors GCE backend config updates. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « appengine/components/components/config/common.py ('k') | appengine/gce-backend/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/components/components/config/common_test.py
diff --git a/appengine/components/components/config/common_test.py b/appengine/components/components/config/common_test.py
index 7c3f3dd8241b6ce5dcbc854154ec12bf6d4e4b35..c1bbb88b7f6be00f59ce3c4da012ba90236d0b07 100755
--- a/appengine/components/components/config/common_test.py
+++ b/appengine/components/components/config/common_test.py
@@ -23,6 +23,15 @@ class CommonCase(test_case.TestCase):
def test_convert_empty(self):
self.assertIsNotNone(common._convert_config('', test_config_pb2.Config))
+ def test_trim_app_id(self):
+ trimmed_app_id = 'gce-backend'
+ app_id_external = trimmed_app_id
+ app_id_internal = 'google.com:%s' % trimmed_app_id
+ app_id_empty = ''
+ self.assertEqual(common._trim_app_id(app_id_external), trimmed_app_id)
+ self.assertEqual(common._trim_app_id(app_id_internal), trimmed_app_id)
+ self.assertEqual(common._trim_app_id(app_id_empty), app_id_empty)
+
if __name__ == '__main__':
if '-v' in sys.argv:
« no previous file with comments | « appengine/components/components/config/common.py ('k') | appengine/gce-backend/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698