mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-04 15:04:43 +00:00
tests: fix lldap setup if data already seeded
This commit is contained in:
@@ -15,15 +15,19 @@ for i in {1..15}; do
|
|||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "LLDAP container setup complete"
|
|
||||||
|
|
||||||
echo "Setting up LLDAP test data..."
|
|
||||||
|
|
||||||
# Configure LLDAP CLI connection via environment variables
|
# Configure LLDAP CLI connection via environment variables
|
||||||
export LLDAP_HTTPURL="http://localhost:17170"
|
export LLDAP_HTTPURL="http://localhost:17170"
|
||||||
export LLDAP_USERNAME="admin"
|
export LLDAP_USERNAME="admin"
|
||||||
export LLDAP_PASSWORD="admin_password"
|
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
|
# Create test users using the user add command
|
||||||
echo "Creating test users..."
|
echo "Creating test users..."
|
||||||
lldap-cli user add "testuser1" "testuser1@pocket-id.org" \
|
lldap-cli user add "testuser1" "testuser1@pocket-id.org" \
|
||||||
|
|||||||
Reference in New Issue
Block a user