1
0
mirror of https://github.com/go-acme/lego.git synced 2025-12-01 09:16:39 +02:00

chore: homogeneous tests setup and close servers. (#1520)

This commit is contained in:
Ludovic Fernandez
2021-11-02 00:52:38 +01:00
committed by GitHub
parent 15f3a45342
commit e719fabe96
54 changed files with 371 additions and 387 deletions

View File

@@ -74,8 +74,7 @@ rzFL1KZfz+HZdnFwFW2T2gVW8L3ii1l9AJDuKzlvjUH3p6bgihVq02sjT8mx+GM2
`
func TestCertificateService_Get_issuerRelUp(t *testing.T) {
mux, apiURL, tearDown := tester.SetupFakeAPI()
defer tearDown()
mux, apiURL := tester.SetupFakeAPI(t)
mux.HandleFunc("/certificate", func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Link", "<"+apiURL+`/issuer>; rel="up"`)
@@ -106,8 +105,7 @@ func TestCertificateService_Get_issuerRelUp(t *testing.T) {
}
func TestCertificateService_Get_embeddedIssuer(t *testing.T) {
mux, apiURL, tearDown := tester.SetupFakeAPI()
defer tearDown()
mux, apiURL := tester.SetupFakeAPI(t)
mux.HandleFunc("/certificate", func(w http.ResponseWriter, _ *http.Request) {
_, err := w.Write([]byte(certResponseMock))