mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-01 18:00:46 +01:00
Update s3-iam-tests.yml
This commit is contained in:
1 parent
306389b8e4
commit
efe95f631e
1 file changed
+5
-51
@@ -241,50 +241,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
go install -buildvcs=false
|
go install -buildvcs=false
|
||||||
|
|
||||||
- name: Start Keycloak with Docker
|
- name: Configure Keycloak (repo script only)
|
||||||
run: |
|
run: |
|
||||||
echo "Starting Keycloak container..."
|
echo "Configuring Keycloak via repo script..."
|
||||||
docker run -d \
|
|
||||||
--name keycloak \
|
|
||||||
-p 8080:8080 \
|
|
||||||
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
|
|
||||||
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
|
|
||||||
-e KC_HTTP_ENABLED=true \
|
|
||||||
-e KC_HOSTNAME_STRICT=false \
|
|
||||||
-e KC_HOSTNAME_STRICT_HTTPS=false \
|
|
||||||
quay.io/keycloak/keycloak:26.0 \
|
|
||||||
start-dev
|
|
||||||
|
|
||||||
echo "Waiting for Keycloak to be ready..."
|
|
||||||
timeout 300 bash -c '
|
|
||||||
while true; do
|
|
||||||
if curl -s http://localhost:8080/health/ready > /dev/null 2>&1; then
|
|
||||||
echo "✅ Keycloak health check passed"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if curl -s http://localhost:8080/realms/master > /dev/null 2>&1; then
|
|
||||||
echo "✅ Keycloak master realm accessible"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo "Waiting for Keycloak..."
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
' || {
|
|
||||||
echo "Keycloak failed to start"
|
|
||||||
docker logs keycloak
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Keycloak is ready"
|
|
||||||
|
|
||||||
- name: Setup Keycloak Realm and Users
|
|
||||||
working-directory: test/s3/iam
|
|
||||||
run: |
|
|
||||||
echo "Setting up Keycloak realm and test users..."
|
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y jq
|
sudo apt-get install -y jq
|
||||||
chmod +x setup_keycloak.sh
|
bash test/s3/iam/setup_keycloak.sh
|
||||||
./setup_keycloak.sh
|
|
||||||
|
|
||||||
- name: Start SeaweedFS Services
|
- name: Start SeaweedFS Services
|
||||||
working-directory: test/s3/iam
|
working-directory: test/s3/iam
|
||||||
@@ -305,16 +267,8 @@ jobs:
|
|||||||
export KEYCLOAK_URL="http://localhost:8080"
|
export KEYCLOAK_URL="http://localhost:8080"
|
||||||
export S3_ENDPOINT="http://localhost:8333"
|
export S3_ENDPOINT="http://localhost:8333"
|
||||||
|
|
||||||
# Give services extra time to fully initialize
|
# Ensure the seaweedfs-test realm is available before running tests (repo script should have created it)
|
||||||
sleep 10
|
timeout 120 bash -c 'until curl -fs http://localhost:8080/realms/seaweedfs-test/.well-known/openid-configuration > /dev/null; do echo "... waiting for realm"; sleep 3; done'
|
||||||
|
|
||||||
# Ensure the seaweedfs-test realm is available before running tests
|
|
||||||
echo "Waiting for seaweedfs-test realm to be available..."
|
|
||||||
timeout 120 bash -c 'until curl -fs http://localhost:8080/realms/seaweedfs-test/.well-known/openid-configuration > /dev/null; do echo "... waiting for realm"; sleep 3; done' || {
|
|
||||||
echo "❌ seaweedfs-test realm not available"
|
|
||||||
docker logs keycloak --tail=200 || true
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify services are accessible
|
# Verify services are accessible
|
||||||
echo "=== Verifying Service Accessibility ==="
|
echo "=== Verifying Service Accessibility ==="
|
||||||
|
|||||||
Reference in new issue
Block a user