Skip to content

Commit 0f97141

Browse files
committed
test: acmeserver: add smoke test for the ACME server directory
1 parent ac0ad4d commit 0f97141

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package integration
2+
3+
import (
4+
"testing"
5+
6+
"github.com/caddyserver/caddy/v2/caddytest"
7+
)
8+
9+
func TestACMEServerDirectory(t *testing.T) {
10+
tester := caddytest.NewTester(t)
11+
tester.InitServer(`
12+
{
13+
skip_install_trust
14+
admin localhost:2999
15+
http_port 9080
16+
https_port 9443
17+
pki {
18+
ca local {
19+
name "Caddy Local Authority"
20+
}
21+
}
22+
}
23+
acme.localhost:9443 {
24+
acme_server
25+
}
26+
`, "caddyfile")
27+
tester.AssertGetResponse(
28+
"https://acme.localhost:9443/acme/local/directory",
29+
200,
30+
`{"newNonce":"https://acme.localhost:9443/acme/local/new-nonce","newAccount":"https://acme.localhost:9443/acme/local/new-account","newOrder":"https://acme.localhost:9443/acme/local/new-order","revokeCert":"https://acme.localhost:9443/acme/local/revoke-cert","keyChange":"https://acme.localhost:9443/acme/local/key-change"}
31+
`)
32+
}

0 commit comments

Comments
 (0)