Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Integration tests are broken #924

Closed
Tracked by #4
jsumners opened this issue Aug 2, 2023 · 1 comment
Closed
Tracked by #4

Integration tests are broken #924

jsumners opened this issue Aug 2, 2023 · 1 comment

Comments

@jsumners
Copy link
Member

jsumners commented Aug 2, 2023

While working on a test case for #923 I discovered that the latest Docker image is failing on:

tap.test('modifyDN with long name (issue #480)', t => {
const longStr = 'a292979f2c86d513d48bbb9786b564b3c5228146e5ba46f404724e322544a7304a2b1049168803a5485e2d57a544c6a0d860af91330acb77e5907a9e601ad1227e80e0dc50abe963b47a004f2c90f570450d0e920d15436fdc771e3bdac0487a9735473ed3a79361d1778d7e53a7fb0e5f01f97a75ef05837d1d5496fc86968ff47fcb64'
const targetDN = 'cn=Turanga Leela,ou=people,dc=planetexpress,dc=com'
const client = ldapjs.createClient({ url: baseURL })
client.bind('cn=admin,dc=planetexpress,dc=com', 'GoodNewsEveryone', bindHandler)
function bindHandler (err) {
t.error(err)
client.modifyDN(
targetDN,
`cn=${longStr},ou=people,dc=planetexpress,dc=com`,
modifyHandler
)
}
function modifyHandler (err, res) {
t.error(err)
t.ok(res)
t.equal(res.status, 0)
client.modifyDN(
`cn=${longStr},ou=people,dc=planetexpress,dc=com`,
targetDN,
(err) => {
t.error(err)
client.unbind(t.end)
}
)
}
})

The issue is that it hits: https://git.openldap.org/openldap/openldap/-/blob/2738a32de3a324fc56effd44c2fedaff1a359011/servers/slapd/back-mdb/modrdn.c#L442

We need to figure out how to get the MDB store to accept this, or figure out how to re-enable HDB.

@jsumners
Copy link
Member Author

jsumners commented Aug 2, 2023

The following script shows the error with the standard CLI tools:

#!/usr/bin/env bash

set -e

function cleanup() {
  echo "Stopping server..."
  docker stop ldap-test 2>&1 1>/dev/null
}
trap cleanup EXIT

echo "Starting server..."
docker run --rm -d \
  -p 1389:389 -p 1636:636 \
  --name ldap-test \
  ghcr.io/ldapjs/docker-test-openldap/openldap:2023-07-25 2>&1 1>/dev/null

echo "Waiting for server to start..."
sleep 3

echo "Renaming entry..."
docker exec ldap-test \
  ldapmodrdn -x -H ldapi:/// \
    -D 'cn=admin,dc=planetexpress,dc=com' \
    -w 'GoodNewsEveryone' \
    -v -d 2 \
    'cn=Turanga Leela,ou=people,dc=planetexpress,dc=com' \
    'cn=a292979f2c86d513d48bbb9786b564b3c5228146e5ba46f404724e322544a7304a2b1049168803a5485e2d57a544c6a0d860af91330acb77e5907a9e601ad1227e80e0dc50abe963b47a004f2c90f570450d0e920d15436fdc771e3bdac0487a9735473ed3a79361d1778d7e53a7fb0e5f01f97a75ef05837d1d5496fc86968ff47fcb64'

jsumners added a commit that referenced this issue Aug 15, 2023
jsumners added a commit that referenced this issue Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant