Skip to content

Commit

Permalink
test: add test for tls case (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra authored Dec 15, 2023
1 parent 46d936f commit 1d25d70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/caddy/caddy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func TestConvertToCaddyfile(t *testing.T) {
Rules: []config.Rule{
{
Match: "localhost",
Tls: "internal",
ReverseProxy: []config.ReverseProxy{
{
Path: "/",
Expand All @@ -25,7 +26,7 @@ func TestConvertToCaddyfile(t *testing.T) {
}

caddyfile := ConvertToCaddyfile(caddyCfg, 8080)
expectedCaddyfile := "localhost {\n reverse_proxy / http://localhost:8080\n}\n"
expectedCaddyfile := "localhost {\n tls {\n internal\n }\n reverse_proxy / http://localhost:8080\n}\n"
assert.Equal(t, expectedCaddyfile, caddyfile)
}

Expand Down

0 comments on commit 1d25d70

Please sign in to comment.