mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] mergebot: allow running tests without verbose github logging
Mergebot & forwardbot have ultra-verbose logging of all github interactions in order to better understand what happens exactly when there are issues with gh integration (and/or provide to GH support). However in most cases this is a pain in the ass when reviewing test logs. So suppress these github_requests logs by default when testing.
This commit is contained in:
parent
1b9bd67776
commit
bb2582ec29
@ -67,6 +67,7 @@ NGROK_CLI = [
|
|||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
parser.addoption('--addons-path')
|
parser.addoption('--addons-path')
|
||||||
parser.addoption("--no-delete", action="store_true", help="Don't delete repo after a failed run")
|
parser.addoption("--no-delete", action="store_true", help="Don't delete repo after a failed run")
|
||||||
|
parser.addoption('--log-github', action='store_true')
|
||||||
|
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
'--tunnel', action="store", type="choice", choices=['ngrok', 'localtunnel'], default='ngrok',
|
'--tunnel', action="store", type="choice", choices=['ngrok', 'localtunnel'], default='ngrok',
|
||||||
@ -290,10 +291,14 @@ def port():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def server(request, db, port, module):
|
def server(request, db, port, module):
|
||||||
|
opts = ['--log-handler', 'github_requests:WARNING']
|
||||||
|
if request.config.getoption('--log-github'):
|
||||||
|
opts = []
|
||||||
|
|
||||||
p = subprocess.Popen([
|
p = subprocess.Popen([
|
||||||
'odoo', '--http-port', str(port),
|
'odoo', '--http-port', str(port),
|
||||||
'--addons-path', request.config.getoption('--addons-path'),
|
'--addons-path', request.config.getoption('--addons-path'),
|
||||||
'-d', db,
|
'-d', db, *opts,
|
||||||
'--max-cron-threads', '0', # disable cron threads (we're running crons by hand)
|
'--max-cron-threads', '0', # disable cron threads (we're running crons by hand)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user