Skip to content

Commit 2623a1a

Browse files
h4x3rotabclaude
andcommitted
Enhance e2e test with HTTP/2 and gRPC protocol coverage
- Add multi-domain test: whoami (HTTP/1.1) + grpcbin (gRPC/H2) backends - Use ROUTING_MAP with SNI-based routing to test multi-backend support - Add comma-separated ROUTING_MAP parsing (phala CLI -e flattens newlines) - Test HTTP/2 against h2c-capable backend (grpcbin), not HTTP/1.1-only whoami - Verify gRPC reflection, unary call, and SNI routing separation - All 17 tests pass on live Phala CVM deployment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d3c8c96 commit 2623a1a

2 files changed

Lines changed: 183 additions & 61 deletions

File tree

custom-domain/dstack-ingress/scripts/entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ EVIDENCE_BLOCK
182182
fi
183183

184184
# Parse ROUTING_MAP and generate use_backend rules + backend sections
185+
# Support both newline-separated and comma-separated formats
186+
local routing_map_normalized
187+
routing_map_normalized=$(echo "$ROUTING_MAP" | tr ',' '\n')
188+
185189
local backend_rules=""
186190
local backend_sections=""
187191
local first_be_name=""
@@ -211,7 +215,7 @@ EVIDENCE_BLOCK
211215
212216
backend ${be_name}
213217
server s1 ${target}"
214-
done <<< "$ROUTING_MAP"
218+
done <<< "$routing_map_normalized"
215219

216220
echo "$backend_rules" >> /etc/haproxy/haproxy.cfg
217221

0 commit comments

Comments
 (0)