Skip to content

Commit

Permalink
Migrate golang/mock to uber/mock (#2310)
Browse files Browse the repository at this point in the history
* migrate to uber/mock

* update go-stoabs to 1.9.0
  • Loading branch information
gerardsn authored Jul 6, 2023
1 parent e579393 commit 16d9102
Show file tree
Hide file tree
Showing 120 changed files with 185 additions and 186 deletions.
2 changes: 1 addition & 1 deletion audit/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ package audit

import (
"context"
"github.com/golang/mock/gomock"
"github.com/labstack/echo/v4"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"strings"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/api/auth/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"context"
"errors"
"fmt"
"github.com/golang/mock/gomock"
ssi "github.com/nuts-foundation/go-did"
"github.com/nuts-foundation/go-did/did"
"github.com/nuts-foundation/go-did/vc"
Expand All @@ -38,6 +37,7 @@ import (
"github.com/nuts-foundation/nuts-node/vdr"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"net/http"
"net/url"
"reflect"
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
package auth

import (
"github.com/golang/mock/gomock"
"github.com/nuts-foundation/nuts-node/crypto"
"github.com/nuts-foundation/nuts-node/pki"
"github.com/nuts-foundation/nuts-node/vcr"
"github.com/nuts-foundation/nuts-node/vdr/didstore"
"go.uber.org/mock/gomock"
"testing"

"github.com/nuts-foundation/nuts-node/core"
Expand Down
2 changes: 1 addition & 1 deletion auth/contract/signer_mock.go

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

2 changes: 1 addition & 1 deletion auth/services/irma/signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
"github.com/nuts-foundation/nuts-node/vcr"
"github.com/nuts-foundation/nuts-node/vdr"

"github.com/golang/mock/gomock"
"github.com/nuts-foundation/nuts-node/auth/contract"
"github.com/nuts-foundation/nuts-node/auth/services"
irma "github.com/privacybydesign/irmago"
irmaservercore "github.com/privacybydesign/irmago/server"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
)

func TestSessionPtr_MarshalJSON(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion auth/services/mock.go

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

2 changes: 1 addition & 1 deletion auth/services/notary/notary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
ssi "github.com/nuts-foundation/go-did"
"github.com/nuts-foundation/go-did/vc"
"github.com/nuts-foundation/nuts-node/auth/contract"
Expand All @@ -41,6 +40,7 @@ import (
irma "github.com/privacybydesign/irmago"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

var orgID = vdr.TestDIDA
Expand Down
2 changes: 1 addition & 1 deletion auth/services/oauth/authz_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/lestrrat-go/jwx/jwa"
"github.com/lestrrat-go/jwx/jws"
"github.com/lestrrat-go/jwx/jwt"
Expand All @@ -52,6 +51,7 @@ import (
"github.com/nuts-foundation/nuts-node/vdr/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

var requesterSigningKey, _ = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
Expand Down
2 changes: 1 addition & 1 deletion auth/services/oauth/mock.go

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

2 changes: 1 addition & 1 deletion auth/services/oauth/relying_party_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
ssi "github.com/nuts-foundation/go-did"
"github.com/nuts-foundation/go-did/did"
"github.com/nuts-foundation/go-did/vc"
Expand All @@ -44,6 +43,7 @@ import (
"github.com/nuts-foundation/nuts-node/vdr/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

func TestRelyingParty_RequestAccessToken(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion auth/services/selfsigned/signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"context"
"encoding/json"
"errors"
"github.com/golang/mock/gomock"
ssi "github.com/nuts-foundation/go-did"
"github.com/nuts-foundation/go-did/did"
"github.com/nuts-foundation/go-did/vc"
Expand All @@ -35,6 +34,7 @@ import (
"github.com/nuts-foundation/nuts-node/vcr/verifier"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"os"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/services/selfsigned/types/mock.go

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

2 changes: 1 addition & 1 deletion auth/services/selfsigned/web/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ package web
import (
"bytes"
"fmt"
"github.com/golang/mock/gomock"
"github.com/nuts-foundation/nuts-node/auth/contract"
"github.com/nuts-foundation/nuts-node/auth/services/selfsigned/types"
"github.com/nuts-foundation/nuts-node/mock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"net/http"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion auth/services/uzi/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/nuts-foundation/go-did/vc"
"github.com/nuts-foundation/nuts-node/auth/services"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/nuts-foundation/nuts-node/auth/contract"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/services/x509/x509_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"crypto/x509/pkix"
"encoding/asn1"
"encoding/base64"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"math/big"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion auth/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ package auth
import (
"testing"

"github.com/golang/mock/gomock"
"github.com/nuts-foundation/nuts-node/crypto"
"github.com/nuts-foundation/nuts-node/pki"
"github.com/nuts-foundation/nuts-node/vcr"
"github.com/nuts-foundation/nuts-node/vdr/didstore"
"go.uber.org/mock/gomock"
)

func TestConfig() Config {
Expand Down
2 changes: 1 addition & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"path"
"testing"

"github.com/golang/mock/gomock"
"github.com/nuts-foundation/nuts-node/core"
"github.com/nuts-foundation/nuts-node/test/io"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
)

func Test_rootCmd(t *testing.T) {
Expand Down
Loading

0 comments on commit 16d9102

Please sign in to comment.