From 12c04828c1e8fb2417dc345d7049865a4671b4af Mon Sep 17 00:00:00 2001 From: xenolf Date: Sun, 18 Oct 2015 02:09:19 +0200 Subject: [PATCH] Move the tests to a different port. --- acme/simple_http_challenge_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acme/simple_http_challenge_test.go b/acme/simple_http_challenge_test.go index eef8b161..282f296c 100644 --- a/acme/simple_http_challenge_test.go +++ b/acme/simple_http_challenge_test.go @@ -57,7 +57,7 @@ func TestSimpleHTTP(t *testing.T) { } // Validate error on unexpected state - solver.optPort = "8080" + solver.optPort = "23456" if err = solver.Solve(clientChallenge, "test.domain"); err == nil { t.Error("UNEXPECTED: Expected Solve to return an error but the error was nil.") } @@ -86,7 +86,7 @@ func TestSimpleHTTP(t *testing.T) { t.Errorf("VALID: Expected Solve to return no error but the error was -> %v", err) } - // Validate server on port 8080 which responds appropriately + // Validate server on port 23456 which responds appropriately clientChallenge.Token = "1234567812" ts.Config.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { var request challenge @@ -111,13 +111,13 @@ func TestSimpleHTTP(t *testing.T) { transport := &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}} client := &http.Client{Transport: transport} - reqURL := "https://localhost:8080/.well-known/acme-challenge/" + clientChallenge.Token + reqURL := "https://localhost:23456/.well-known/acme-challenge/" + clientChallenge.Token t.Logf("Request URL is: %s", reqURL) req, _ := http.NewRequest("GET", reqURL, nil) req.Host = "test.domain" resp, err := client.Do(req) if err != nil { - t.Errorf("Expected the solver to listen on port 8080 -> %v", err) + t.Errorf("Expected the solver to listen on port 23456 -> %v", err) } body, _ := ioutil.ReadAll(resp.Body)