Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the tests hangs indefinitely #40

Closed
SirTakobi opened this issue Dec 16, 2022 · 1 comment
Closed

Running the tests hangs indefinitely #40

SirTakobi opened this issue Dec 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@SirTakobi
Copy link

Module

not a modules repository

Describe the bug

The tests hang on

❯ docker run -v $PWD/tests:/mnt/tests ghcr.io/oca/oca-ci/py3.8-odoo14.0:latest /mnt/tests/runtests.sh -v
Unable to find image 'ghcr.io/oca/oca-ci/py3.8-odoo14.0:latest' locally
latest: Pulling from oca/oca-ci/py3.8-odoo14.0
eaead16dc43b: Pull complete
69623f897469: Pull complete
cb04cdf8294b: Pull complete
1cdf5e92710b: Pull complete
8bcb80089e13: Pull complete
0127f8309be7: Pull complete
9eaa49ee8f9e: Pull complete
e9d854d08099: Pull complete
d4d3858bb4a9: Pull complete
c88165554b6f: Pull complete
2074cac1f696: Pull complete
9b40702c51ca: Pull complete
23554f0dbe2d: Pull complete
be60c6f99f89: Pull complete
ee4d20d20c14: Pull complete
1e8d4dcb3909: Pull complete
341ccbaa2c55: Pull complete
74775fe9453f: Pull complete
b769083296ea: Pull complete
c486ab10f179: Pull complete
1a3d2699c705: Pull complete
cc98a71c2060: Pull complete
702d4c016a8e: Pull complete
3078e2daea60: Pull complete
Digest: sha256:430787fcf2f71049a02ebad84733678f6bf5d0dd33670053a3e9060aeeb7d331
Status: Downloaded newer image for ghcr.io/oca/oca-ci/py3.8-odoo14.0:latest
created virtual environment CPython3.8.10.final.0-64 in 91ms
creator CPython3Posix(dest=/tmp/testvenv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
added seed packages: pip==22.2.2, setuptools==65.3.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Looking in indexes: https://wheelhouse.odoo-community.org/oca-simple-and-pypi
Collecting pytest
Downloading pytest-7.2.0-py3-none-any.whl (316 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 316.8/316.8 kB 2.1 MB/s eta 0:00:00
Collecting pluggy<2.0,>=0.12
Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting attrs>=19.2.0
Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 593.7 kB/s eta 0:00:00
Collecting packaging
Downloading packaging-22.0-py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 80.6 kB/s eta 0:00:00
Collecting iniconfig
Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting tomli>=1.0.0
Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting exceptiongroup>=1.0.0rc8
Downloading exceptiongroup-1.0.4-py3-none-any.whl (14 kB)
Installing collected packages: iniconfig, tomli, pluggy, packaging, exceptiongroup, attrs, pytest
Successfully installed attrs-22.1.0 exceptiongroup-1.0.4 iniconfig-1.1.1 packaging-22.0 pluggy-1.0.0 pytest-7.2.0 tomli-2.0.1
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.2.0, pluggy-1.0.0 -- /tmp/testvenv/bin/python
cachedir: .pytest_cache
rootdir: /mnt/tests
collecting ... collected 17 items

mnt/tests/test_addons_path.py::test_addons_path PASSED [ 5%]
mnt/tests/test_list_external_dependencies.py::test_list_external_dependencies PASSED [ 11%]
mnt/tests/test_list_external_dependencies.py::test_list_external_dependencies_transitive PASSED [ 17%]
mnt/tests/test_no_addons.py::test_no_addons

To Reproduce

Affected versions:
master
Steps to reproduce the behavior:

  1. Clone the repository and move in there
  2. Execute

    docker run -v $PWD/tests:/mnt/tests ghcr.io/oca/oca-ci/py3.8-odoo14.0:latest /mnt/tests/runtests.sh -v

Expected behavior
The tests should run

Additional context
Looking at the processes, the tests are waiting for postgres:
image
maybe postgres should be configured somehow before running the tests?

@SirTakobi SirTakobi added the bug Something isn't working label Dec 16, 2022
@sbidoul
Copy link
Member

sbidoul commented Jan 25, 2023

Yes, you need to pass PGHOST, PGUSER, PGPASSWORD environment variables to the container so it can start connect to postgres.

So this is not a bug, and I've created #43 instead.

@sbidoul sbidoul closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants