SQSCANGHA-112 Fix redirect test to deal with TLS
This commit is contained in:
committed by
Julien HENRY
parent
cbabf0572a
commit
ee80e84272
4
.github/qa-nginx-redirecting/compose.yml
vendored
4
.github/qa-nginx-redirecting/compose.yml
vendored
@@ -5,8 +5,10 @@ services:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- $GITHUB_WORKSPACE/.github/qa-nginx-redirecting/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- $GITHUB_WORKSPACE/.github/qa-nginx-redirecting/nginx.crt:/etc/nginx/nginx.crt:ro
|
||||
- $GITHUB_WORKSPACE/.github/qa-nginx-redirecting/nginx.key:/etc/nginx/nginx.key:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "localhost:8080/health"]
|
||||
test: ["CMD", "curl", "--fail", "--insecure", "https://localhost:8080/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
|
||||
10
.github/qa-nginx-redirecting/generate-ssl.sh
vendored
Executable file
10
.github/qa-nginx-redirecting/generate-ssl.sh
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Generate self-signed SSL certificate for localhost with 1-day expiry
|
||||
openssl req -x509 -nodes -days 1 -newkey rsa:2048 \
|
||||
-keyout nginx.key \
|
||||
-out nginx.crt \
|
||||
-subj "/C=US/ST=CA/L=Local/O=Test/CN=localhost" \
|
||||
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1"
|
||||
|
||||
echo "SSL certificates generated with 1-day expiry: nginx.crt and nginx.key"
|
||||
4
.github/qa-nginx-redirecting/nginx.conf
vendored
4
.github/qa-nginx-redirecting/nginx.conf
vendored
@@ -18,7 +18,9 @@ http {
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
listen 8080 ssl;
|
||||
ssl_certificate /etc/nginx/nginx.crt;
|
||||
ssl_certificate_key /etc/nginx/nginx.key;
|
||||
|
||||
location /health {
|
||||
add_header 'Content-Type' 'text/plain';
|
||||
|
||||
Reference in New Issue
Block a user