Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
woutslakhorst committed May 13, 2024
1 parent 2d3bb79 commit c9c9541
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
6 changes: 4 additions & 2 deletions discovery/api/server/client/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import "github.com/nuts-foundation/go-did/vc"

// PresentationsResponse is the response for the GetPresentations endpoint.
type PresentationsResponse struct {
Entries map[string]vc.VerifiablePresentation `json:"entries"`
Timestamp int `json:"timestamp"`
// Entries contains mappings from timestamp (as string) to a VerifiablePresentation.
Entries map[string]vc.VerifiablePresentation `json:"entries"`
// Timestamp is the timestamp of the latest entry. It's not a unix timestamp but a Lamport Clock.
Timestamp int `json:"timestamp"`
}
19 changes: 0 additions & 19 deletions discovery/interface_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions discovery/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ func setupModule(t *testing.T, storageInstance storage.Engine, visitors ...func(
m.config = DefaultConfig()
require.NoError(t, m.Configure(core.TestServerConfig()))
httpClient := client.NewMockHTTPClient(ctrl)
httpClient.EXPECT().Get(gomock.Any(), testEndpointOther, gomock.Any()).Return(nil, 0, nil).AnyTimes()
httpClient.EXPECT().Get(gomock.Any(), testEndpointUSecase, gomock.Any()).Return(nil, 0, nil).AnyTimes()
httpClient.EXPECT().Get(gomock.Any(), "http://example.com/other", gomock.Any()).Return(nil, 0, nil).AnyTimes()
httpClient.EXPECT().Get(gomock.Any(), "http://example.com/usecase", gomock.Any()).Return(nil, 0, nil).AnyTimes()
m.httpClient = httpClient
m.allDefinitions = testDefinitions()
m.serverDefinitions = map[string]ServiceDefinition{
Expand Down
2 changes: 0 additions & 2 deletions discovery/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ var vpBob vc.VerifiablePresentation
var unsupportedDID did.DID

var testServiceID = "usecase_v1"
var testEndpointOther = "http://example.com/other"
var testEndpointUSecase = "http://example.com/usecase"

func testDefinitions() map[string]ServiceDefinition {
issuerPattern := "did:example:*"
Expand Down

0 comments on commit c9c9541

Please sign in to comment.