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

Unified Diff: pylibs/buildbot/test/test_status_push.py

Issue 809001: Rename a few variables and greatly reduce the amount of data sent for steps* events (Closed)
Patch Set: Rebase against trunk and fix the unit test again Created 10 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
« no previous file with comments | « pylibs/buildbot/status/status_push.py ('k') | pylibs/buildbot/test/test_web_status_json.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylibs/buildbot/test/test_status_push.py
diff --git a/pylibs/buildbot/test/test_status_push.py b/pylibs/buildbot/test/test_status_push.py
index ea988163d73c576ef07fa8519303192bc6b045b9..3093118e96d24e3702f71208a4db02e694fad5e8 100644
--- a/pylibs/buildbot/test/test_status_push.py
+++ b/pylibs/buildbot/test/test_status_push.py
@@ -65,12 +65,12 @@ EXPECTED = [
'payload': {
'builder': {
"category": None,
- "cached_builds": [],
+ "cachedBuilds": [],
"basedir": "quickdir",
- "pending_builds": [],
+ "pendingBuilds": [],
"state": "offline",
"slaves": ["bot1"],
- "current_builds": []
+ "currentBuilds": []
},
'builderName': 'dummy',
}
@@ -155,8 +155,9 @@ EXPECTED = [
'payload': {
'build': {
'blame': [],
+ 'builderName': 'dummy',
'changes': [],
- 'current_step': None,
+ 'currentStep': None,
'eta': None,
'number': 0,
'properties': [
@@ -182,7 +183,7 @@ EXPECTED = [
],
'results': None,
'slave': 'bot1',
- 'source_stamp': {
+ 'sourceStamp': {
'branch': None,
'changes': [],
'patch': None,
@@ -192,8 +193,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': False,
+ 'isFinished': False,
+ 'isStarted': False,
'name': 'cvs',
'results': [[None, []], []],
'statistics': {},
@@ -204,8 +205,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': False,
+ 'isFinished': False,
+ 'isStarted': False,
'name': 'compile',
'results': [[None, []], []],
'statistics': {},
@@ -216,8 +217,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': False,
+ 'isFinished': False,
+ 'isStarted': False,
'name': 'test',
'results': [[None, []], []],
'statistics': {},
@@ -237,8 +238,8 @@ EXPECTED = [
'step': {
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': True,
+ 'isFinished': False,
+ 'isStarted': True,
'name': 'cvs',
'results': [[None, []], []],
'statistics': {},
@@ -246,93 +247,13 @@ EXPECTED = [
'times': [123, None],
'urls': {}
},
- 'build': {
- 'blame': [],
- 'changes': [],
- 'current_step': {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': True,
- 'name': 'cvs',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['updating'],
- 'times': [234, None],
- 'urls': {}
- },
- 'eta': None,
- 'number': 0,
- 'properties': [
- ['branch', None, 'Build'],
- ['buildername', 'dummy', 'Build'],
- ['buildnumber', 0, 'Build'],
- ['revision', None, 'Build'],
- ['slavename', 'bot1', 'BuildSlave']
- ],
- 'reason': 'forced build',
- 'requests': [
- {
- 'builderName': 'test_builder',
- 'builds': [],
- 'source': {
- 'branch': None,
- 'changes': [],
- 'patch': None,
- 'revision': None
- },
- 'submittedAt': 'yesterday'
- }
- ],
- 'results': None,
- 'slave': 'bot1',
- 'source_stamp': {
- 'branch': None,
- 'changes': [],
- 'patch': None,
- 'revision': None
- },
- 'steps': [
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': True,
- 'name': 'cvs',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['updating'],
- 'times': [345, None],
- 'urls': {}
- },
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': False,
- 'name': 'compile',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['compiling'],
- 'times': [345, None],
- 'urls': {}
- },
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': False,
- 'name': 'test',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['testing'],
- 'times': [345, None],
- 'urls': {}
- }
- ],
- 'text': [],
- 'times': [123, None]
- }
+ 'properties': [
+ ['branch', None, 'Build'],
+ ['buildername', 'dummy', 'Build'],
+ ['buildnumber', 0, 'Build'],
+ ['revision', None, 'Build'],
+ ['slavename', 'bot1', 'BuildSlave']
+ ],
}
},
{
@@ -341,8 +262,8 @@ EXPECTED = [
'step': {
'eta': None,
'expectations': [],
- 'is_finished': True,
- 'is_started': True,
+ 'isFinished': True,
+ 'isStarted': True,
'name': 'cvs',
'results': [2, ['cvs']],
'statistics': {},
@@ -350,104 +271,23 @@ EXPECTED = [
'times': [123, None],
'urls': {}
},
- 'build': {
- 'blame': [],
- 'changes': [],
- 'current_step': {
- 'eta': None,
- 'expectations': [],
- 'is_finished': True,
- 'is_started': True,
- 'name': 'cvs',
- 'results': [2, ['cvs']],
- 'statistics': {},
- 'text': ['update', 'failed'],
- 'times': [234, None],
- 'urls': {}
- },
- 'eta': None,
- 'number': 0,
- 'properties': [
- ['branch', None, 'Build'],
- ['buildername', 'dummy', 'Build'],
- ['buildnumber', 0, 'Build'],
- ['revision', None, 'Build'],
- ['slavename', 'bot1', 'BuildSlave']
- ],
- 'reason': 'forced build',
- 'requests': [
- {
- 'builderName': 'test_builder',
- 'builds': [0],
- 'source': {
- 'branch': None,
- 'changes': [],
- 'patch': None,
- 'revision': None
- },
- 'submittedAt': 'yesterday'
- }
- ],
- 'results': None,
- 'slave': 'bot1',
- 'source_stamp': {
- 'branch': None,
- 'changes': [],
- 'patch': None,
- 'revision': None
- },
- 'steps': [
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': True,
- 'is_started': True,
- 'name': 'cvs',
- 'results': [2, ['cvs']],
- 'statistics': {},
- 'text': ['update', 'failed'],
- 'times': [345, None],
- 'urls': {}
- },
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': False,
- 'name': 'compile',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['compiling'],
- 'times': [345, None],
- 'urls': {}
- },
- {
- 'eta': None,
- 'expectations': [],
- 'is_finished': False,
- 'is_started': False,
- 'name': 'test',
- 'results': [[None, []], []],
- 'statistics': {},
- 'text': ['testing'],
- 'times': [345, None],
- 'urls': {}
- }
- ],
- 'text': ['cvs'],
- 'times': [123, None]
- },
- 'results': [2, ['cvs']]
+ 'properties': [
+ ['branch', None, 'Build'],
+ ['buildername', 'dummy', 'Build'],
+ ['buildnumber', 0, 'Build'],
+ ['revision', None, 'Build'],
+ ['slavename', 'bot1', 'BuildSlave']
+ ],
}
},
{
'event': 'buildFinished',
'payload': {
- 'results': 2,
'build': {
'blame': [],
+ 'builderName': 'dummy',
'changes': [],
- 'current_step': None,
+ 'currentStep': None,
'eta': None,
'number': 0,
'properties': [
@@ -472,7 +312,7 @@ EXPECTED = [
],
'results': 2,
'slave': 'bot1',
- 'source_stamp': {
+ 'sourceStamp': {
'branch': None,
'changes': [],
'patch': None,
@@ -482,8 +322,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': True,
- 'is_started': True,
+ 'isFinished': True,
+ 'isStarted': True,
'name': 'cvs',
'results': [2, ['cvs']],
'statistics': {},
@@ -494,8 +334,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': False,
+ 'isFinished': False,
+ 'isStarted': False,
'name': 'compile',
'results': [[None, []], []],
'statistics': {},
@@ -506,8 +346,8 @@ EXPECTED = [
{
'eta': None,
'expectations': [],
- 'is_finished': False,
- 'is_started': False,
+ 'isFinished': False,
+ 'isStarted': False,
'name': 'test',
'results': [[None, []], []],
'statistics': {},
@@ -519,7 +359,6 @@ EXPECTED = [
'text': ['failed', 'cvs'],
'times': [123, None]
},
- 'builderName': 'dummy'
}
},
{
« no previous file with comments | « pylibs/buildbot/status/status_push.py ('k') | pylibs/buildbot/test/test_web_status_json.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698