aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-09-13 14:31:34 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-09-13 14:31:34 +0200
commitf34351da0731a11316e2266d2aadd62554a5b867 (patch)
tree588a32ab99204db86d66bf6ece829b6a15bbbbea
parent5632bd67ed38625a8c8c372302aa7b19d163512e (diff)
s/get-proof-by-hash/get-inclusion-proof
-rw-r--r--pkg/instance/endpoint_test.go4
-rw-r--r--pkg/instance/instance.go2
-rw-r--r--pkg/instance/instance_test.go2
-rw-r--r--pkg/types/types.go2
-rw-r--r--pkg/types/types_test.go4
5 files changed, 7 insertions, 7 deletions
diff --git a/pkg/instance/endpoint_test.go b/pkg/instance/endpoint_test.go
index b138936..51ec0f4 100644
--- a/pkg/instance/endpoint_test.go
+++ b/pkg/instance/endpoint_test.go
@@ -502,7 +502,7 @@ func TestGetInclusionProof(t *testing.T) {
}
// Create HTTP request
- url := types.EndpointGetProofByHash.Path("http://example.com", i.Prefix)
+ url := types.EndpointGetInclusionProof.Path("http://example.com", i.Prefix)
req, err := http.NewRequest("POST", url, table.ascii)
if err != nil {
t.Fatalf("must create http request: %v", err)
@@ -510,7 +510,7 @@ func TestGetInclusionProof(t *testing.T) {
// Run HTTP request
w := httptest.NewRecorder()
- mustHandle(t, i, types.EndpointGetProofByHash).ServeHTTP(w, req)
+ mustHandle(t, i, types.EndpointGetInclusionProof).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 87a0c36..809349c 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -53,7 +53,7 @@ func (i *Instance) Handlers() []Handler {
Handler{Instance: i, Handler: getTreeHeadToSign, Endpoint: types.EndpointGetTreeHeadToSign, Method: http.MethodGet},
Handler{Instance: i, Handler: getTreeHeadCosigned, Endpoint: types.EndpointGetTreeHeadCosigned, Method: http.MethodGet},
Handler{Instance: i, Handler: getConsistencyProof, Endpoint: types.EndpointGetConsistencyProof, Method: http.MethodPost},
- Handler{Instance: i, Handler: getInclusionProof, Endpoint: types.EndpointGetProofByHash, Method: http.MethodPost},
+ Handler{Instance: i, Handler: getInclusionProof, Endpoint: types.EndpointGetInclusionProof, Method: http.MethodPost},
Handler{Instance: i, Handler: getLeaves, Endpoint: types.EndpointGetLeaves, Method: http.MethodPost},
}
}
diff --git a/pkg/instance/instance_test.go b/pkg/instance/instance_test.go
index 1eba2bf..3f8dced 100644
--- a/pkg/instance/instance_test.go
+++ b/pkg/instance/instance_test.go
@@ -17,7 +17,7 @@ func TestHandlers(t *testing.T) {
types.EndpointGetTreeHeadToSign: false,
types.EndpointGetTreeHeadCosigned: false,
types.EndpointGetConsistencyProof: false,
- types.EndpointGetProofByHash: false,
+ types.EndpointGetInclusionProof: false,
types.EndpointGetLeaves: false,
}
i := &Instance{
diff --git a/pkg/types/types.go b/pkg/types/types.go
index 9ca7db8..96e2b18 100644
--- a/pkg/types/types.go
+++ b/pkg/types/types.go
@@ -18,7 +18,7 @@ const (
EndpointGetTreeHeadLatest = Endpoint("get-tree-head-latest")
EndpointGetTreeHeadToSign = Endpoint("get-tree-head-to-sign")
EndpointGetTreeHeadCosigned = Endpoint("get-tree-head-cosigned")
- EndpointGetProofByHash = Endpoint("get-proof-by-hash")
+ EndpointGetInclusionProof = Endpoint("get-inclusion-proof")
EndpointGetConsistencyProof = Endpoint("get-consistency-proof")
EndpointGetLeaves = Endpoint("get-leaves")
)
diff --git a/pkg/types/types_test.go b/pkg/types/types_test.go
index a71d14b..d823ea2 100644
--- a/pkg/types/types_test.go
+++ b/pkg/types/types_test.go
@@ -35,8 +35,8 @@ func TestEndpointPath(t *testing.T) {
want: "example.com/log/sigsum/v0/get-consistency-proof",
},
{
- endpoint: EndpointGetProofByHash,
- want: "example.com/log/sigsum/v0/get-proof-by-hash",
+ endpoint: EndpointGetInclusionProof,
+ want: "example.com/log/sigsum/v0/get-inclusion-proof",
},
{
endpoint: EndpointGetLeaves,