Skip to content

Commit

Permalink
Generate mocks for all the IBM Cloud services (kubernetes-sigs#1913)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik-K-N authored Aug 8, 2024
1 parent d1e1250 commit 0bcfba8
Show file tree
Hide file tree
Showing 11 changed files with 764 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pkg/cloud/services/cos/cos.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (
"github.com/IBM/ibm-cos-sdk-go/service/s3"
)

//go:generate ../../../../hack/tools/bin/mockgen -source=./cos.go -destination=./mock/cos_generated.go -package=mock
//go:generate /usr/bin/env bash -c "cat ../../../../hack/boilerplate/boilerplate.generatego.txt ./mock/cos_generated.go > ./mock/_cos_generated.go && mv ./mock/_cos_generated.go ./mock/cos_generated.go"

// Cos interface defines a method that a IBMCLOUD service object should implement in order to
// use the cos package for listing resource instances.
type Cos interface {
Expand Down
182 changes: 182 additions & 0 deletions pkg/cloud/services/cos/mock/cos_generated.go

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

3 changes: 3 additions & 0 deletions pkg/cloud/services/globaltagging/globaltagging.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import (
"github.com/IBM/platform-services-go-sdk/globaltaggingv1"
)

//go:generate ../../../../hack/tools/bin/mockgen -source=./globaltagging.go -destination=./mock/globaltagging_generated.go -package=mock
//go:generate /usr/bin/env bash -c "cat ../../../../hack/boilerplate/boilerplate.generatego.txt ./mock/globaltagging_generated.go > ./mock/_globaltagging_generated.go && mv ./mock/_globaltagging_generated.go ./mock/globaltagging_generated.go"

// GlobalTagging interface defines a method that a IBMCLOUD service object should implement in order to
// use the manage tags with the Global Tagging APIs.
type GlobalTagging interface {
Expand Down
103 changes: 103 additions & 0 deletions pkg/cloud/services/globaltagging/mock/globaltagging_generated.go

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

Loading

0 comments on commit 0bcfba8

Please sign in to comment.