wip
This commit is contained in:
parent
ffa406ef20
commit
74cfe7c989
|
|
@ -44,5 +44,4 @@ pytest:
|
||||||
# Create a postgresql container
|
# Create a postgresql container
|
||||||
- docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --publish 9542:5432 --name db postgres:13
|
- docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --publish 9542:5432 --name db postgres:13
|
||||||
|
|
||||||
- poetry run pytest --cov odoo_openupgrade_wizard -v\
|
- poetry run pytest --cov odoo_openupgrade_wizard -v tests/cli_A_init_test.py
|
||||||
tests/cli_A_init_test.py
|
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,12 @@ def get_postgres_container():
|
||||||
def execute_sql_request(request, database="postgres"):
|
def execute_sql_request(request, database="postgres"):
|
||||||
container = get_postgres_container()
|
container = get_postgres_container()
|
||||||
docker_command = (
|
docker_command = (
|
||||||
"psql --username=odoo --dbname={database} -t"
|
"psql"
|
||||||
' -c "{request}"'.format(database=database, request=request)
|
" --username=odoo"
|
||||||
)
|
" --dbname={database}"
|
||||||
|
" --tuples-only"
|
||||||
|
' --command "{request}"'
|
||||||
|
).format(database=database, request=request)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Executing the following command in postgres container"
|
"Executing the following command in postgres container"
|
||||||
" on database %s \n %s" % (database, request)
|
" on database %s \n %s" % (database, request)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user