Registry testing - part 9
This commit is contained in:
26
tests/docker/scripts/gen-certs.sh
Executable file
26
tests/docker/scripts/gen-certs.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CERT_DIR=/certs
|
||||
|
||||
if [ ! -f "$CERT_DIR/cert.pem" ]; then
|
||||
echo "Generating self-signed certificate..."
|
||||
openssl req -x509 -newkey rsa:2048 -nodes \
|
||||
-keyout "$CERT_DIR/key.pem" \
|
||||
-out "$CERT_DIR/cert.pem" \
|
||||
-days 365 \
|
||||
-subj "/CN=localhost/O=Stalwart Test/C=US" \
|
||||
-addext "subjectAltName=DNS:localhost,DNS:keycloak,DNS:openldap,DNS:pebble,DNS:*.stalwart.test,IP:127.0.0.1"
|
||||
|
||||
# Create combined PEM for services that need it
|
||||
cat "$CERT_DIR/cert.pem" "$CERT_DIR/key.pem" > "$CERT_DIR/combined.pem"
|
||||
|
||||
# Create PKCS12 for Keycloak
|
||||
openssl pkcs12 -export -in "$CERT_DIR/cert.pem" -inkey "$CERT_DIR/key.pem" \
|
||||
-out "$CERT_DIR/keystore.p12" -name localhost -password pass:changeit
|
||||
|
||||
chmod 644 "$CERT_DIR"/*
|
||||
echo "Certificates generated."
|
||||
else
|
||||
echo "Certificates already exist."
|
||||
fi
|
||||
7
tests/docker/scripts/init-fdb.sh
Executable file
7
tests/docker/scripts/init-fdb.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
fdbcli --exec "configure new single memory"
|
||||
echo "FoundationDB configured."
|
||||
exit 0
|
||||
|
||||
12
tests/docker/scripts/init-minio.sh
Executable file
12
tests/docker/scripts/init-minio.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Wait for MinIO to be ready
|
||||
echo "Waiting for MinIO..."
|
||||
until mc alias set local http://minio:9000 minioadmin minioadmin 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Create the stalwart bucket
|
||||
mc mb local/stalwart --ignore-existing
|
||||
echo "MinIO bucket 'stalwart' created."
|
||||
Reference in New Issue
Block a user