diff --git a/16.0.Dockerfile b/16.0.Dockerfile index 9887cef7..b41dbc3b 100644 --- a/16.0.Dockerfile +++ b/16.0.Dockerfile @@ -133,7 +133,7 @@ RUN build_deps=" \ pydevd-odoo \ git+https://github.com/mailgun/flanker.git@v0.9.15#egg=flanker[validator] \ geoip2 \ - "git-aggregator<3.0.0" \ + "git-aggregator==4.0" \ inotify \ pdfminer.six \ pg_activity \ diff --git a/17.0.Dockerfile b/17.0.Dockerfile index fc0d4dcf..432cf503 100644 --- a/17.0.Dockerfile +++ b/17.0.Dockerfile @@ -133,7 +133,7 @@ RUN build_deps=" \ pydevd-odoo \ git+https://github.com/mailgun/flanker.git@v0.9.15#egg=flanker[validator] \ geoip2 \ - "git-aggregator<3.0.0" \ + "git-aggregator==4.0" \ inotify \ pdfminer.six \ pg_activity \ diff --git a/tests/__init__.py b/tests/__init__.py index 541054bb..684288ea 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -721,8 +721,8 @@ def test_repo_merge_aggregate_permissions(self): UID=str(os.getuid()), GID=str(os.getgid()), ), - # prepare repos.yaml to be non fast forward - ("/opt/odoo/custom/build.d/099-git_merge_no_ff",), + # create a fake odoo git repo to ensure a merge commit is created + ("/opt/odoo/custom/build.d/099-create-fake-odoo",), # autoaggregate as odoo:odoo to check if merges also work ("autoaggregate",), ( diff --git a/tests/scaffoldings/repo_merge/custom/build.d/099-create-fake-odoo b/tests/scaffoldings/repo_merge/custom/build.d/099-create-fake-odoo new file mode 100755 index 00000000..85995f55 --- /dev/null +++ b/tests/scaffoldings/repo_merge/custom/build.d/099-create-fake-odoo @@ -0,0 +1,19 @@ +#!/bin/bash +rm -rf /tmp/fake-odoo +mkdir /tmp/fake-odoo +cd /tmp/fake-odoo + +git init +touch odoo-bin +git add odoo-bin +git commit -m odoo-bin + +git checkout -b branch1 +touch 1.txt +git add 1.txt +git commit -m 1.txt + +git checkout -b branch2 HEAD~1 +touch 2.txt +git add 2.txt +git commit -m 2.txt diff --git a/tests/scaffoldings/repo_merge/custom/build.d/099-git_merge_no_ff b/tests/scaffoldings/repo_merge/custom/build.d/099-git_merge_no_ff deleted file mode 100755 index 6e6ecc63..00000000 --- a/tests/scaffoldings/repo_merge/custom/build.d/099-git_merge_no_ff +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -# configure git for odoo to merge without fast forward to test config for merge commits in autoaggregate -su --shell="$SHELL" odoo -c 'git config --global merge.ff false' -su --shell="$SHELL" odoo -c 'git config --global pull.ff false' - -# prepare a forced merge by using an OCB version that is one commit behind the ODOO_VERSION branch -OCB_VERSION_ONE_BEHIND=$(curl -s "https://api.github.com/repos/OCA/OCB/commits?page=2&per_page=1&sha=$ODOO_VERSION" | python -c 'import json, sys; print(json.loads("".join([l for l in sys.stdin]))[0]["sha"])') -# shellcheck disable=SC2016 -sed -i 's/\$ODOO_VERSION^1/'"$OCB_VERSION_ONE_BEHIND"'/' /opt/odoo/custom/src/repos.yaml diff --git a/tests/scaffoldings/repo_merge/custom/src/repos.yaml b/tests/scaffoldings/repo_merge/custom/src/repos.yaml index c04e6692..fcb83956 100644 --- a/tests/scaffoldings/repo_merge/custom/src/repos.yaml +++ b/tests/scaffoldings/repo_merge/custom/src/repos.yaml @@ -3,10 +3,7 @@ defaults: depth: $DEPTH_MERGE remotes: - ocb: https://github.com/OCA/OCB.git - target: ocb $ODOO_VERSION + local: /tmp/fake-odoo merges: - # $ODOO_VERSION^1 gets replaced by commit sha that is one behind $ODOO_VERSION in OCB repo by 099-git_merge_no_ff - # in this test, to force gitaggregate creating a merge request - - ocb $ODOO_VERSION^1 - - ocb $ODOO_VERSION + - local branch1 + - local branch2 diff --git a/tests/scaffoldings/repo_merge/docker-compose.yaml b/tests/scaffoldings/repo_merge/docker-compose.yaml index de4ff6b2..909657a5 100644 --- a/tests/scaffoldings/repo_merge/docker-compose.yaml +++ b/tests/scaffoldings/repo_merge/docker-compose.yaml @@ -6,6 +6,7 @@ services: args: COMPILE: "false" ODOO_VERSION: $ODOO_MINOR + PIP_INSTALL_ODOO: "false" # ensure build.d/700-odoo-install does not fail WITHOUT_DEMO: "false" environment: PYTHONOPTIMIZE: ""