Skip to content

Commit 3f60dc2

Browse files
committed
fix: test + setuptools
1 parent aef9796 commit 3f60dc2

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

recipes/16.0/overrides.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
greenlet==1.1.3
22
gevent==21.12.0
3+
setuptools==75.1.0

recipes/17.0/overrides.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
greenlet==1.1.3
22
gevent==21.12.0
3+
setuptools==75.1.0

tests/conftest.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"18.0": "17",
2727
"19.0": "18",
2828
}
29+
OLDER_VERSIONS = ("6.0", "6.1", "7.0", "8.0", "9.0", "10.0")
2930

3031

3132
def _podman_execute(service: str, command: list[str], tty: bool = False) -> str:
@@ -241,6 +242,21 @@ def docker_env(env_info):
241242
)
242243

243244
# Initialize Database
245+
init_params = [
246+
"odoo",
247+
"-c",
248+
"/etc/odoo/odoo.conf",
249+
"-i",
250+
"base",
251+
"--stop-after-init",
252+
]
253+
if odoo_ver != "6.0":
254+
init_params += [
255+
"--max-cron-threads",
256+
"0",
257+
"--no-xmlrpc" if odoo_ver in OLDER_VERSIONS else "--no-http",
258+
]
259+
244260
if client_type == "podman":
245261
subprocess.run(
246262
[
@@ -251,16 +267,8 @@ def docker_env(env_info):
251267
"run",
252268
"--rm",
253269
"odoo",
254-
"odoo",
255-
"-c",
256-
"/etc/odoo/odoo.conf",
257-
"-i",
258-
"base",
259-
"--stop-after-init",
260-
"--no-http",
261-
"--max-cron-threads",
262-
"0",
263-
],
270+
]
271+
+ init_params,
264272
stdout=subprocess.PIPE,
265273
stderr=subprocess.PIPE,
266274
text=True,
@@ -270,17 +278,7 @@ def docker_env(env_info):
270278
else:
271279
docker.compose.run(
272280
"odoo",
273-
[
274-
"odoo",
275-
"-c",
276-
"/etc/odoo/odoo.conf",
277-
"-i",
278-
"base",
279-
"--stop-after-init",
280-
"--no-http",
281-
"--max-cron-threads",
282-
"0",
283-
],
281+
init_params,
284282
remove=True,
285283
)
286284

0 commit comments

Comments
 (0)