aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-05-17 15:24:21 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-05-21 23:43:47 +0200
commit7d6e75b97484f96a243491cc0d655c4f3df7df9d (patch)
tree11d87dbdd23d07ea5f69a86d8d77c636915c260f
parent45d7f7875ce885369b1d1aecc644875cf6bbfdba (diff)
s/EndpointGetTreeHeadToSign/EndpointGetTreeHeadToCoSign/g
-rw-r--r--pkg/instance/handler_test.go6
-rw-r--r--pkg/instance/instance.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/instance/handler_test.go b/pkg/instance/handler_test.go
index c7539b7..50bd3a4 100644
--- a/pkg/instance/handler_test.go
+++ b/pkg/instance/handler_test.go
@@ -53,7 +53,7 @@ func TestHandlers(t *testing.T) {
endpoints := map[types.Endpoint]bool{
types.EndpointAddLeaf: false,
types.EndpointAddCosignature: false,
- types.EndpointGetTreeHeadToSign: false,
+ types.EndpointGetTreeHeadToCosign: false,
types.EndpointGetTreeHeadCosigned: false,
types.EndpointGetConsistencyProof: false,
types.EndpointGetInclusionProof: false,
@@ -352,7 +352,7 @@ func TestGetTreeToSign(t *testing.T) {
}
// Create HTTP request
- url := types.EndpointGetTreeHeadToSign.Path("http://example.com", i.Prefix)
+ url := types.EndpointGetTreeHeadToCosign.Path("http://example.com", i.Prefix)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
t.Fatalf("must create http request: %v", err)
@@ -360,7 +360,7 @@ func TestGetTreeToSign(t *testing.T) {
// Run HTTP request
w := httptest.NewRecorder()
- mustHandle(t, i, types.EndpointGetTreeHeadToSign).ServeHTTP(w, req)
+ mustHandle(t, i, types.EndpointGetTreeHeadToCosign).ServeHTTP(w, req)
if got, want := w.Code, table.wantCode; got != want {
t.Errorf("got HTTP status code %v but wanted %v in test %q", got, want, table.description)
}
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index 7f84bbb..f4c0089 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -42,7 +42,7 @@ func (i *Instance) Handlers() []Handler {
return []Handler{
Handler{Instance: i, Handler: addLeaf, Endpoint: types.EndpointAddLeaf, Method: http.MethodPost},
Handler{Instance: i, Handler: addCosignature, Endpoint: types.EndpointAddCosignature, Method: http.MethodPost},
- Handler{Instance: i, Handler: getTreeHeadToCosign, Endpoint: types.EndpointGetTreeHeadToSign, Method: http.MethodGet}, // XXX: ToCosign
+ Handler{Instance: i, Handler: getTreeHeadToCosign, Endpoint: types.EndpointGetTreeHeadToCosign, Method: http.MethodGet},
Handler{Instance: i, Handler: getTreeHeadCosigned, Endpoint: types.EndpointGetTreeHeadCosigned, Method: http.MethodGet},
Handler{Instance: i, Handler: getCheckpoint, Endpoint: types.Endpoint("get-checkpoint"), Method: http.MethodGet},
Handler{Instance: i, Handler: getConsistencyProof, Endpoint: types.EndpointGetConsistencyProof, Method: http.MethodGet},