Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change IBMPowerVSClient type for better mocking #577

Merged
merged 1 commit into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloud/scope/powervs_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type PowerVSClusterScope struct {
client client.Client
patchHelper *patch.Helper

IBMPowerVSClient *powervs.Service
IBMPowerVSClient powervs.PowerVS
Cluster *clusterv1.Cluster
IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
}
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/powervs_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type PowerVSImageScope struct {
client client.Client
patchHelper *patch.Helper

IBMPowerVSClient *powervs.Service
IBMPowerVSClient powervs.PowerVS
IBMPowerVSImage *v1beta1.IBMPowerVSImage
}

Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/powervs_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type PowerVSMachineScope struct {
client client.Client
patchHelper *patch.Helper

IBMPowerVSClient *powervs.Service
IBMPowerVSClient powervs.PowerVS
Cluster *clusterv1.Cluster
Machine *clusterv1.Machine
IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/services/powervs/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s *Service) GetAllNetwork() (*models.Networks, error) {
}

// NewService returns a new service for the Power VS api client.
func NewService(options ServiceOptions) (*Service, error) {
func NewService(options ServiceOptions) (PowerVS, error) {
auth, err := authenticator.GetAuthenticator()
if err != nil {
return nil, err
Expand Down