Skip to content

Commit

Permalink
regen mocks, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Dec 12, 2024
1 parent 84d4626 commit 85195a6
Show file tree
Hide file tree
Showing 56 changed files with 114 additions and 12 deletions.
1 change: 1 addition & 0 deletions auth/api/iam/jar_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions auth/client/iam/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions auth/contract/signer_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions auth/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions auth/services/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions auth/services/oauth/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions auth/services/selfsigned/types/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/echo_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions core/engine_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions crypto/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crypto/storage/azure/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crypto/storage/spi/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions didman/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions discovery/api/server/client/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions discovery/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions events/events_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions events/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions http/echo_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions network/dag/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions network/dag/notifier_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions network/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ func TestNetwork_checkHealth(t *testing.T) {
t.Run("TLS", func(t *testing.T) {
t.Run("up", func(t *testing.T) {
mockPKIValidator := pki.NewMockValidator(gomock.NewController(t))
mockPKIValidator.EXPECT().Validate([]*x509.Certificate{certificate.Leaf})
mockPKIValidator.EXPECT().CheckCRL([]*x509.Certificate{certificate.Leaf})
n := Network{
trustStore: trustStore,
certificate: certificate,
Expand All @@ -1270,7 +1270,7 @@ func TestNetwork_checkHealth(t *testing.T) {
})
t.Run("revoked/denied certificate", func(t *testing.T) {
mockPKIValidator := pki.NewMockValidator(gomock.NewController(t))
mockPKIValidator.EXPECT().Validate([]*x509.Certificate{certificate.Leaf}).Return(errors.New("custom error"))
mockPKIValidator.EXPECT().CheckCRL([]*x509.Certificate{certificate.Leaf}).Return(errors.New("custom error"))
n := Network{
trustStore: trustStore,
certificate: certificate,
Expand Down Expand Up @@ -1322,7 +1322,7 @@ func TestNetwork_checkHealth(t *testing.T) {
cxt.network.certificate = certificate
cxt.network.nodeDID = *nodeDID
cxt.didStore.EXPECT().Resolve(*nodeDID, nil).MinTimes(1).Return(completeDocument, &resolver.DocumentMetadata{}, nil)
cxt.pkiValidator.EXPECT().Validate([]*x509.Certificate{certificate.Leaf})
cxt.pkiValidator.EXPECT().CheckCRL([]*x509.Certificate{certificate.Leaf})

health := cxt.network.CheckHealth()

Expand Down
1 change: 1 addition & 0 deletions network/transport/connection_manager_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85195a6

Please sign in to comment.