tests: fix lldap setup if data already seeded

This commit is contained in:
Elias Schneider
2025-05-23 09:16:13 +02:00
parent f57c8d347e
commit 3042de2ce1

View File

@@ -15,15 +15,19 @@ for i in {1..15}; do
sleep 3
done
echo "LLDAP container setup complete"
echo "Setting up LLDAP test data..."
# Configure LLDAP CLI connection via environment variables
export LLDAP_HTTPURL="http://localhost:17170"
export LLDAP_USERNAME="admin"
export LLDAP_PASSWORD="admin_password"
echo "Checking if data is already seeded..."
if lldap-cli user list | grep -q "testuser1"; then
echo "Data already seeded, skipping setup."
exit 0
fi
echo "Setting up LLDAP test data..."
# Create test users using the user add command
echo "Creating test users..."
lldap-cli user add "testuser1" "testuser1@pocket-id.org" \