Skip to content

Commit a90118a

Browse files
committed
feat: embed saml config into generate
1 parent 3c48ef7 commit a90118a

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/dockerimage.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ jobs:
88
env:
99
# Use short project name, otherwise inspect output is messy
1010
COMPOSE_PROJECT_NAME: wl
11-
TEST_EXTRA_ENV: 'WEBLATE_SAML_IDP_URL: https://example.com/idp'
1211

1312
steps:
1413
- uses: actions/checkout@v4
1514
- name: Test content
1615
run: ./test-content
1716
- name: Generate configuration
18-
run: ./test-generate 8080 http
17+
run: ./test-generate 8080 http saml
1918
- name: Startup container
2019
run: ./test-boot
2120
- name: List Python packages
@@ -33,7 +32,7 @@ jobs:
3332
- name: Test admin creation
3433
run: ./test-admin
3534
- name: Verify SAML certificate
36-
run: ./test-saml
35+
run: ./test-saml saml
3736
- name: Run commands
3837
run: ./test-commands
3938
- name: Display logs
@@ -47,7 +46,6 @@ jobs:
4746
env:
4847
# Use short project name, otherwise inspect output is messy
4948
COMPOSE_PROJECT_NAME: wl
50-
TEST_EXTRA_ENV: 'WEBLATE_SAML_IDP_URL: https://example.com/idp'
5149

5250
steps:
5351
- uses: actions/checkout@v4
@@ -70,7 +68,7 @@ jobs:
7068
- name: Test admin creation
7169
run: ./test-admin
7270
- name: Verify SAML certificate
73-
run: ./test-saml
71+
run: ./test-saml read-write
7472
- name: Run commands
7573
run: ./test-commands
7674
- name: Display logs

test-generate

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/sh
2+
if [ "$3" = "saml" ] ; then
3+
TEST_EXTRA_ENV='WEBLATE_SAML_IDP_URL: https://example.com/idp'
4+
else
5+
TEST_EXTRA_ENV=''
6+
fi
7+
28
cat > docker-compose.override.yml <<EOT
39
services:
410
weblate:

test-saml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
#!/bin/sh
2-
docker compose exec -T weblate openssl x509 -in /app/data/ssl/saml.crt -text -noout
2+
if [ "$1" = "saml" ] ; then
3+
docker compose exec -T weblate openssl x509 -in /app/data/ssl/saml.crt -text -noout
4+
else
5+
docker compose exec -T weblate test -not -f /app/data/ssl/saml.crt
6+
fi

0 commit comments

Comments
 (0)