Skip to content

Integrations.test is erroneously used as the hook in pre-receive.d of a forked repo in integration testing #1910

Closed
@typeless

Description

@typeless
  • Gitea version (or commit ref):
    v1.1.0-289-g9ddc35e

  • Git version:
    2.7.4

  • Operating system:
    Ubuntu 16.04 64bit

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Under the environment created by integrations.test, a forked repo will contain a hook which looks like the following:

cat /tmp/repo1.git/hooks/pre-receive.d/gitea
#!/usr/bin/env bash
"/home/mura/devel/go/src/code.gitea.io/gitea/integrations.test" hook --config='/home/mura/devel/go/src/code.gitea.io/gitea/integrations/sqlite.ini' pre-receive

For some clues I've found so far:
https://github.com/go-gitea/gitea/blob/master/models/repo.go#L946
https://github.com/go-gitea/gitea/blob/master/modules/setting/setting.go#L510
...

P.S. The problem can be reproduced with #1912

Screenshots

If this issue involves the Web Interface, please include a screenshot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions