Skip to content

Commit

Permalink
Regenerate certain mocks using source mode instead of reflect mode to (
Browse files Browse the repository at this point in the history
…#3886)

fix issues with `make generate` on MacOS
  • Loading branch information
kimorris27 authored Oct 4, 2024
1 parent 3ba0b23 commit 1a51bf4
Show file tree
Hide file tree
Showing 13 changed files with 761 additions and 660 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cluster
// Copyright (c) Microsoft Corporation.
// Licensed under the Apache License 2.0.

//go:generate mockgen -destination=../util/mocks/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/$GOPACKAGE Interface
//go:generate mockgen -source cluster.go -destination=../util/mocks/$GOPACKAGE/$GOPACKAGE.go Interface
//go:generate mockgen -destination=../util/mocks/samplesclient/versioned.go github.com/openshift/client-go/samples/clientset/versioned Interface
//go:generate mockgen -destination=../util/mocks/samples/samples.go github.com/openshift/client-go/samples/clientset/versioned/typed/samples/v1 SamplesV1Interface,ConfigInterface
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/$GOPACKAGE.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/cluster.go
8 changes: 6 additions & 2 deletions pkg/frontend/adminactions/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ package adminactions
// Licensed under the Apache License 2.0.

//go:generate rm -rf ../../util/mocks/$GOPACKAGE
//go:generate mockgen -destination=../../util/mocks/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/frontend/$GOPACKAGE KubeActions,AzureActions,AppLensActions
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../../util/mocks/$GOPACKAGE/$GOPACKAGE.go
//go:generate mockgen -source kubeactions.go -destination=../../util/mocks/$GOPACKAGE/kubeactions.go github.com/Azure/ARO-RP/pkg/frontend/$GOPACKAGE KubeActions
//go:generate mockgen -source azureactions.go -destination=../../util/mocks/$GOPACKAGE/azureactions.go github.com/Azure/ARO-RP/pkg/frontend/$GOPACKAGE AzureActions
//go:generate mockgen -source applens.go -destination=../../util/mocks/$GOPACKAGE/applens.go github.com/Azure/ARO-RP/pkg/frontend/$GOPACKAGE AppLensActions
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../../util/mocks/$GOPACKAGE/kubeactions.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../../util/mocks/$GOPACKAGE/azureactions.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../../util/mocks/$GOPACKAGE/applens.go
10 changes: 8 additions & 2 deletions pkg/frontend/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ package frontend
// Licensed under the Apache License 2.0.

//go:generate rm -rf ../../util/mocks/$GOPACKAGE
//go:generate mockgen -destination=../util/mocks/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/frontend StreamResponder,QuotaValidator,SkuValidator,ProvidersValidator
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/$GOPACKAGE.go
//go:generate mockgen -source quota_validation.go -destination=../util/mocks/$GOPACKAGE/quota_validation.go github.com/Azure/ARO-RP/pkg/frontend QuotaValidator
//go:generate mockgen -source providers_validation.go -destination=../util/mocks/$GOPACKAGE/providers_validation.go github.com/Azure/ARO-RP/pkg/frontend ProvidersValidator
//go:generate mockgen -source sku_validation.go -destination=../util/mocks/$GOPACKAGE/sku_validation.go github.com/Azure/ARO-RP/pkg/frontend SkuValidator
//go:generate mockgen -source adminreplies.go -destination=../util/mocks/$GOPACKAGE/adminreplies.go github.com/Azure/ARO-RP/pkg/frontend StreamResponder
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/quota_validation.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/providers_validation.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/sku_validation.go
//go:generate goimports -local=github.com/Azure/ARO-RP -e -w ../util/mocks/$GOPACKAGE/adminreplies.go
Loading

0 comments on commit 1a51bf4

Please sign in to comment.