-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DO NOT SUBMIT] Saving logging for debugging eg sideloading
b/325626249 Change-Id: I3eb78ad4d51288a447aaf81a08f4f3c91ba03e24
- Loading branch information
1 parent
620f6c9
commit ec819cb
Showing
8 changed files
with
158 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# server.py | ||
|
||
from flask import Flask, jsonify | ||
|
||
app = Flask(__name__) | ||
|
||
first_req = True | ||
|
||
update = { | ||
"server": "prod", | ||
"protocol": "3.1", | ||
"daystart": { | ||
"elapsed_seconds": 51861, | ||
"elapsed_days": 6316 | ||
}, | ||
"app": [ | ||
{ | ||
"cohorthint": "SB16", | ||
"appid": "{A9557415-DDCD-4948-8113-C643EFCF710C}", | ||
"cohort": "1:3f/3i/3j:", | ||
"status": "ok", | ||
"cohortname": "SB16.qa.COBALT", | ||
"ping": { | ||
"status": "ok" | ||
}, | ||
"updatecheck": { | ||
"status": "ok", | ||
"urls": { | ||
"url": [ | ||
{ | ||
"codebase": "https://edgedl.me.gvt1.com/edgedl/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "https://redirector.gvt1.com/edgedl/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "http://edgedl.me.gvt1.com/edgedl/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "http://redirector.gvt1.com/edgedl/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "https://dl.google.com/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "http://dl.google.com/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "https://www.google.com/dl/cobalt/COBALT/99.99.1030/" | ||
}, | ||
{ | ||
"codebase": "http://www.google.com/dl/cobalt/COBALT/99.99.1030/" | ||
} | ||
] | ||
}, | ||
"manifest": { | ||
"version": "99.99.1030", | ||
"packages": { | ||
"package": [ | ||
{ | ||
"hash_sha256": "b43f8d0294ea48c3df44a19f78a354b025a2ab58163c44c1f56ab49327f557db", | ||
"size": 16770294, | ||
"name": "cobalt_x64_sbversion-16_qa_20240417120115.crx", | ||
"fp": "1.b43f8d0294ea48c3df44a19f78a354b025a2ab58163c44c1f56ab49327f557db", | ||
"required": True, | ||
"hash": "iNAb+q7RCoOGPR5FnoInfXIGSFM\u003d" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
||
noupdate = { | ||
"server": "prod", | ||
"protocol": "3.1", | ||
"daystart": { | ||
"elapsed_seconds": 51881, | ||
"elapsed_days": 6316 | ||
}, | ||
"app": [ | ||
{ | ||
"cohorthint": "SB16.qa.COBALT", | ||
"appid": "{A9557415-DDCD-4948-8113-C643EFCF710C}", | ||
"cohort": "1:3f/3i/3j:", | ||
"status": "ok", | ||
"cohortname": "SB16.qa.COBALT", | ||
"ping": { | ||
"status": "ok" | ||
}, | ||
"updatecheck": { | ||
"status": "noupdate" | ||
} | ||
} | ||
] | ||
} | ||
|
||
|
||
@app.route('/test/omaha/fake', methods=['POST']) | ||
def get_tasks(): | ||
if first_req: | ||
return jsonify({'response': update}) | ||
else: | ||
return jsonify({'response': noupdate}) | ||
|
||
|
||
if __name__ == '__main__': | ||
app.run(debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ Brotli==1.0.9 | |
six<2 | ||
pytest-pythonpath<0.8 | ||
parameterized>=0.9.0 | ||
flask |