1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-30 19:22:08 +00:00

[v12.0/forgejo] fix: upgrade to the ldap version used for testing to 2.5 (#9419)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/9417

The LDAP server ontainer image used for tests is pre-populated with:

- https://github.com/rroemhild/docker-test-openldap/tree/v2.5.0/rootfs/
- https://code.forgejo.org/forgejo/forgejo-test-openldap/src/branch/main/rootfs (adds files)

---

use https://code.forgejo.org/forgejo/forgejo-test-openldap with ldap 2.5 instead of a stretch based image with ldap 2.4 that cannot be rebuilt.

- user sshuser exists specifically to test sshKey sync  instead of a modified hermes user
- user bender was different from the base image for no useful  purpose (accent in the name), remove the accent
- the port is 10389 by default instead of 389

Refs https://codeberg.org/forgejo/forgejo/issues/9406

Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9419
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-09-25 14:57:03 +02:00 committed by Earl Warren
parent 4b8a01c879
commit b85ac45c99
2 changed files with 15 additions and 9 deletions

View file

@ -228,7 +228,7 @@ jobs:
MINIO_ROOT_PASSWORD: 12345678
options: --tmpfs /bitnami/minio/data
ldap:
image: data.forgejo.org/oci/test-openldap:latest
image: data.forgejo.org/oci/forgejo-test-openldap:1
pgsql:
image: data.forgejo.org/oci/bitnami/postgresql:16
env:

View file

@ -49,12 +49,7 @@ var gitLDAPUsers = []ldapUser{
Password: "hermes",
FullName: "Conrad Hermes",
Email: "hermes@planetexpress.com",
SSHKeys: []string{
"SHA256:qLY06smKfHoW/92yXySpnxFR10QFrLdRjf/GNPvwcW8",
"SHA256:QlVTuM5OssDatqidn2ffY+Lc4YA5Fs78U+0KOHI51jQ",
"SHA256:DXdeUKYOJCSSmClZuwrb60hUq7367j4fA+udNC3FdRI",
},
IsAdmin: true,
IsAdmin: true,
},
{
UserName: "fry",
@ -72,9 +67,20 @@ var gitLDAPUsers = []ldapUser{
{
UserName: "bender",
Password: "bender",
FullName: "Bender Rodríguez",
FullName: "Bender Rodriguez",
Email: "bender@planetexpress.com",
},
{
UserName: "sshuser",
Password: "sshuser",
FullName: "SSH User",
SSHKeys: []string{
"SHA256:qLY06smKfHoW/92yXySpnxFR10QFrLdRjf/GNPvwcW8",
"SHA256:QlVTuM5OssDatqidn2ffY+Lc4YA5Fs78U+0KOHI51jQ",
"SHA256:DXdeUKYOJCSSmClZuwrb60hUq7367j4fA+udNC3FdRI",
},
Email: "sshuser@planetexpress.com",
},
}
var otherLDAPUsers = []ldapUser{
@ -107,7 +113,7 @@ func getLDAPServerHost() string {
func getLDAPServerPort() string {
port := os.Getenv("TEST_LDAP_PORT")
if len(port) == 0 {
port = "389"
port = "10389"
}
return port
}