aboutsummaryrefslogtreecommitdiff
path: root/endpoint_test.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-01 21:37:54 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2021-06-01 21:37:54 +0200
commit2dcaf038655426c572c5d292973001c581f0a1a2 (patch)
treef52f2c93404a3f13e590c4af87ff349d563eae14 /endpoint_test.go
parent2c2c6936a93ce4f18302426a665ed5782910ab85 (diff)
moved endpoint type into types
Diffstat (limited to 'endpoint_test.go')
-rw-r--r--endpoint_test.go48
1 files changed, 0 insertions, 48 deletions
diff --git a/endpoint_test.go b/endpoint_test.go
index aab2c54..e515635 100644
--- a/endpoint_test.go
+++ b/endpoint_test.go
@@ -452,54 +452,6 @@ func TestEndpointGetEntriesV1(t *testing.T) {
}
}
-func TestEndpointPath(t *testing.T) {
- base, prefix, proto := "http://example.com", "test", "st/v1"
- for _, table := range []struct {
- endpoint Endpoint
- want string
- }{
- {
- endpoint: EndpointAddEntry,
- want: "http://example.com/test/st/v1/add-entry",
- },
- {
- endpoint: EndpointAddCosignature,
- want: "http://example.com/test/st/v1/add-cosignature",
- },
- {
- endpoint: EndpointGetLatestSth,
- want: "http://example.com/test/st/v1/get-latest-sth",
- },
- {
- endpoint: EndpointGetStableSth,
- want: "http://example.com/test/st/v1/get-stable-sth",
- },
- {
- endpoint: EndpointGetCosignedSth,
- want: "http://example.com/test/st/v1/get-cosigned-sth",
- },
- {
- endpoint: EndpointGetConsistencyProof,
- want: "http://example.com/test/st/v1/get-consistency-proof",
- },
- {
- endpoint: EndpointGetProofByHash,
- want: "http://example.com/test/st/v1/get-proof-by-hash",
- },
- {
- endpoint: EndpointGetEntries,
- want: "http://example.com/test/st/v1/get-entries",
- },
- } {
- if got, want := table.endpoint.Path(base+"/"+prefix+"/"+proto), table.want; got != want {
- t.Errorf("got endpoint\n%s\n\tbut wanted\n%s\n\twith one component", got, want)
- }
- if got, want := table.endpoint.Path(base, prefix, proto), table.want; got != want {
- t.Errorf("got endpoint\n%s\n\tbut wanted\n%s\n\tmultiple components", got, want)
- }
- }
-}
-
// TODO: TestWriteOctetResponse
func TestWriteOctetResponse(t *testing.T) {
}