diff options
| -rw-r--r-- | pkg/instance/handler_test.go | 6 | ||||
| -rw-r--r-- | pkg/instance/instance.go | 2 | 
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}, | 
