diff options
author | Mohammed Al Sahaf <[email protected]> | 2023-10-24 20:59:53 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-24 13:59:53 -0400 |
commit | d949caf459c3e046e6f4020dbb685c07812d5b80 (patch) | |
tree | 80cd1af1e92aa5167fe8fa247007e628860dc4e7 | |
parent | ac0ad4da84b3bb478ecfe4a0e81a2e6bb1e10c9c (diff) | |
download | caddy-d949caf459c3e046e6f4020dbb685c07812d5b80.tar.gz caddy-d949caf459c3e046e6f4020dbb685c07812d5b80.zip |
test: acmeserver: add smoke test for the ACME server directory (#5914)
-rw-r--r-- | caddytest/integration/acmeserver_test.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/caddytest/integration/acmeserver_test.go b/caddytest/integration/acmeserver_test.go new file mode 100644 index 000000000..0323d5cdd --- /dev/null +++ b/caddytest/integration/acmeserver_test.go @@ -0,0 +1,33 @@ +package integration + +import ( + "testing" + + "github.com/caddyserver/caddy/v2/caddytest" +) + +func TestACMEServerDirectory(t *testing.T) { + tester := caddytest.NewTester(t) + tester.InitServer(` + { + skip_install_trust + local_certs + admin localhost:2999 + http_port 9080 + https_port 9443 + pki { + ca local { + name "Caddy Local Authority" + } + } + } + acme.localhost:9443 { + acme_server + } + `, "caddyfile") + tester.AssertGetResponse( + "https://acme.localhost:9443/acme/local/directory", + 200, + `{"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"} +`) +} |