diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-12-01 19:45:55 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-12-01 19:45:55 +0100 |
commit | 12af3f2e8fad65534b83260967ea7463df6ca652 (patch) | |
tree | 97aab78be87e0c62bf6498011f8b041d859566c9 /handler_test.go | |
parent | 6cd12911f4d3aa4c6a75c922f9de231e2cf309dd (diff) |
renamed and documented function
Diffstat (limited to 'handler_test.go')
-rw-r--r-- | handler_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/handler_test.go b/handler_test.go index 34f390a..689541b 100644 --- a/handler_test.go +++ b/handler_test.go @@ -85,7 +85,7 @@ func TestGetHandlersRejectPost(t *testing.T) { s := httptest.NewServer(handler) defer s.Close() - url := endpoint.Url(s.URL, th.instance.LogParameters.Prefix) + url := endpoint.Path(s.URL, th.instance.LogParameters.Prefix) if rsp, err := http.Post(url, "application/json", nil); err != nil { t.Fatalf("http.Post(%s)=(_,%q), want (_,nil)", url, err) } else if rsp.StatusCode != http.StatusMethodNotAllowed { @@ -105,7 +105,7 @@ func TestPostHandlersRejectGet(t *testing.T) { s := httptest.NewServer(handler) defer s.Close() - url := endpoint.Url(s.URL, th.instance.LogParameters.Prefix) + url := endpoint.Path(s.URL, th.instance.LogParameters.Prefix) if rsp, err := http.Get(url); err != nil { t.Fatalf("http.Get(%s)=(_,%q), want (_,nil)", url, err) } else if rsp.StatusCode != http.StatusMethodNotAllowed { @@ -120,7 +120,7 @@ func TestGetAnchors(t *testing.T) { th := newTestHandler(t, nil) defer th.mockCtrl.Finish() - url := EndpointGetAnchors.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointGetAnchors.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("GET", url, nil) if err != nil { t.Fatalf("failed creating http request: %v", err) @@ -199,7 +199,7 @@ func TestGetEntries(t *testing.T) { th := newTestHandler(t, nil) defer th.mockCtrl.Finish() - url := EndpointGetEntries.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointGetEntries.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("GET", url, nil) if err != nil { t.Fatalf("failed creating http request: %v", err) @@ -312,7 +312,7 @@ func TestAddEntry(t *testing.T) { th := newTestHandler(t, table.signer) defer th.mockCtrl.Finish() - url := EndpointAddEntry.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointAddEntry.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("POST", url, table.breq) if err != nil { t.Fatalf("failed creating http request: %v", err) @@ -406,7 +406,7 @@ func TestGetSth(t *testing.T) { th := newTestHandler(t, table.signer) defer th.mockCtrl.Finish() - url := EndpointGetSth.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointGetSth.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("GET", url, nil) if err != nil { t.Fatalf("failed creating http request: %v", err) @@ -510,7 +510,7 @@ func TestGetConsistencyProof(t *testing.T) { th := newTestHandler(t, nil) defer th.mockCtrl.Finish() - url := EndpointGetConsistencyProof.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointGetConsistencyProof.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("GET", url, nil) if err != nil { t.Fatalf("failed creating http request: %v", err) @@ -619,7 +619,7 @@ func TestGetProofByHash(t *testing.T) { th := newTestHandler(t, nil) defer th.mockCtrl.Finish() - url := EndpointGetProofByHash.Url("http://example.com", th.instance.LogParameters.Prefix) + url := EndpointGetProofByHash.Path("http://example.com", th.instance.LogParameters.Prefix) req, err := http.NewRequest("GET", url, nil) if err != nil { t.Fatalf("failed creating http request: %v", err) |