Skip to content

Commit

Permalink
fix migrate to uber/gomock
Browse files Browse the repository at this point in the history
  • Loading branch information
nsklikas committed Sep 12, 2024
1 parent 3ca5e71 commit d381d43
Show file tree
Hide file tree
Showing 71 changed files with 374 additions and 389 deletions.
2 changes: 1 addition & 1 deletion access_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"net/http/httptest"
"testing"

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

. "github.com/ory/fosite"
. "github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion access_request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"net/url"
"testing"

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

. "github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion access_response_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"fmt"
"testing"

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

. "github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion access_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"testing"

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

. "github.com/ory/fosite"
. "github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion authorize_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"net/url"
"testing"

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

. "github.com/ory/fosite"
. "github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion authorize_request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"net/url"
"testing"

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

. "github.com/ory/fosite"
. "github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion authorize_response_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"context"
"testing"

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

"github.com/ory/fosite"
. "github.com/ory/fosite"
Expand Down
2 changes: 1 addition & 1 deletion authorize_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"net/url"
"testing"

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

. "github.com/ory/fosite"
. "github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion device_request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"net/url"
"testing"

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

. "github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
github.com/stretchr/testify v1.9.0
github.com/tidwall/gjson v1.14.3
go.opentelemetry.io/otel/trace v1.21.0
go.uber.org/mock v0.4.0
golang.org/x/crypto v0.21.0
golang.org/x/net v0.23.0
golang.org/x/oauth2 v0.15.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_authorize_code_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite/internal"

Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_authorize_implicit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/stretchr/testify/assert"

"github.com/golang/mock/gomock"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_client_credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"
"time"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_refresh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite/internal"

Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_resource_owner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"testing"
"time"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"
"time"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/introspector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

"github.com/ory/x/errorsx"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/revocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"testing"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_device_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/ory/fosite/internal"
"github.com/pkg/errors"
gomock "go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"

Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_device_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"github.com/stretchr/testify/require"

"github.com/coocood/freecache"
"github.com/golang/mock/gomock"
"github.com/ory/fosite/handler/rfc8628"
"github.com/ory/fosite/internal"
"github.com/ory/fosite/token/hmac"
"github.com/ory/fosite/token/jwt"
gomock "go.uber.org/mock/gomock"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_explicit_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/ory/fosite/internal/gen"

"github.com/golang/mock/gomock"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_explicit_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"testing"
"time"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_hybrid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/ory/fosite/internal/gen"

cristaljwt "github.com/cristalhq/jwt/v4"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite"
"github.com/ory/fosite/handler/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion handler/openid/flow_implicit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ory/fosite/internal"
"github.com/ory/fosite/internal/gen"

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

"github.com/ory/fosite"
"github.com/ory/fosite/handler/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion handler/openid/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/ory/fosite/internal/gen"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/rfc7523/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/go-jose/go-jose/v3"
"github.com/go-jose/go-jose/v3/jwt"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
2 changes: 1 addition & 1 deletion handler/rfc8628/auth_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite/internal"

Expand Down
2 changes: 1 addition & 1 deletion handler/rfc8628/token_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/coocood/freecache"
"github.com/pkg/errors"

"github.com/golang/mock/gomock"
"github.com/ory/fosite/internal"
gomock "go.uber.org/mock/gomock"

"github.com/ory/fosite/handler/oauth2"
"github.com/ory/fosite/token/hmac"
Expand Down
2 changes: 1 addition & 1 deletion handler/verifiable/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"
"time"

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

"github.com/ory/fosite"
"github.com/ory/fosite/internal"
Expand Down
Loading

0 comments on commit d381d43

Please sign in to comment.