Skip to content

Commit

Permalink
fixes #7592 - adding typed to mockgen (#7647)
Browse files Browse the repository at this point in the history
# Description

Fixes issue #7592 - adding types to generated mocks

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
#7592 .

Fixes: #7592

---------

Signed-off-by: Nick Beenham <1985327+superbeeny@users.noreply.github.com>
Co-authored-by: Karishma Chawla <kachawla@microsoft.com>
  • Loading branch information
2 people authored and sk593 committed Jun 4, 2024
1 parent edd635a commit 2f03113
Show file tree
Hide file tree
Showing 71 changed files with 3,089 additions and 305 deletions.
114 changes: 105 additions & 9 deletions pkg/armrpc/asyncoperation/statusmanager/mock_statusmanager.go

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

2 changes: 1 addition & 1 deletion pkg/armrpc/asyncoperation/statusmanager/statusmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type QueueOperationOptions struct {
RetryAfter time.Duration
}

//go:generate mockgen -destination=./mock_statusmanager.go -package=statusmanager -self_package github.com/radius-project/radius/pkg/armrpc/asyncoperation/statusmanager github.com/radius-project/radius/pkg/armrpc/asyncoperation/statusmanager StatusManager
//go:generate mockgen -typed -destination=./mock_statusmanager.go -package=statusmanager -self_package github.com/radius-project/radius/pkg/armrpc/asyncoperation/statusmanager github.com/radius-project/radius/pkg/armrpc/asyncoperation/statusmanager StatusManager

// StatusManager is an interface to manage async operation status.
type StatusManager interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/aws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/sts"
)

//go:generate mockgen -destination=./client_mock.go -package=aws -self_package github.com/radius-project/radius/pkg/cli/aws github.com/radius-project/radius/pkg/cli/aws Client
//go:generate mockgen -typed -destination=./client_mock.go -package=aws -self_package github.com/radius-project/radius/pkg/cli/aws github.com/radius-project/radius/pkg/cli/aws Client

// Client is an interface that abstracts `rad init`'s interactions with AWS. This is for testing purposes. This is only exported because mockgen requires it.
type Client interface {
Expand Down
58 changes: 53 additions & 5 deletions pkg/cli/aws/client_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 pkg/cli/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/radius-project/radius/pkg/azure/armauth"
)

//go:generate mockgen -destination=./client_mock.go -package=azure -self_package github.com/radius-project/radius/pkg/cli/azure github.com/radius-project/radius/pkg/cli/azure Client
//go:generate mockgen -typed -destination=./client_mock.go -package=azure -self_package github.com/radius-project/radius/pkg/cli/azure github.com/radius-project/radius/pkg/cli/azure Client

// Client is an interface that abstracts `rad init`'s interactions with Azure. This is for testing purposes.
type Client interface {
Expand Down
Loading

0 comments on commit 2f03113

Please sign in to comment.