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

Unified Diff: appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py

Issue 2106633002: swarmbucket: non-string properties (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: swarmbucket: non-string properties Created 4 years, 6 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
Index: appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py
diff --git a/appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py b/appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py
index 399a7e0e2cbed0c982aa311ab4184f6d419028e9..d0ddc02ae182058fa9b5eb21f2c8e3e6e46afb67 100755
--- a/appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py
+++ b/appengine/cr-buildbucket/swarming/test/swarmingcfg_test.py
@@ -36,6 +36,7 @@ class SwarmingCfgTest(testing.AppengineTestCase):
repository='https://x.com',
name='foo',
properties=['a:b'],
+ properties_j=['x:true'],
),
),
],
@@ -63,7 +64,13 @@ class SwarmingCfgTest(testing.AppengineTestCase):
'',
':',
'buildername:foobar',
+ 'x:y',
],
+ properties_j=[
+ 'x:"y"',
+ 'y:b',
+ 'z',
+ ]
),
priority=-1,
),
@@ -87,11 +94,14 @@ class SwarmingCfgTest(testing.AppengineTestCase):
'Either define it in the builder or in "common_dimensions"'),
'builder b2: recipe: name unspecified',
'builder b2: recipe: repository unspecified',
- 'builder b2: recipe: property #1: does not have colon',
- 'builder b2: recipe: property #2: key not specified',
- ('builder b2: recipe: property #3: '
+ 'builder b2: recipe: properties #1: does not have colon',
+ 'builder b2: recipe: properties #2: key not specified',
+ ('builder b2: recipe: properties #3: '
'do not specify buildername property; '
'it is added by swarmbucket automatically'),
+ 'builder b2: recipe: properties_j #1: duplicate property "x"',
+ 'builder b2: recipe: properties_j #2: No JSON object could be decoded',
+ 'builder b2: recipe: properties_j #3: does not have colon',
'builder b2: priority must be in [0, 200] range; got -1',
])
@@ -127,6 +137,6 @@ class SwarmingCfgTest(testing.AppengineTestCase):
],
)
self.cfg_test(cfg, [
- 'common_recipe: property #1: does not have colon',
+ 'common_recipe: properties #1: does not have colon',
'builder debug: recipe: repository unspecified',
])

Powered by Google App Engine
This is Rietveld 408576698