Skip to content

Commit eabe535

Browse files
committed
Fixed linting and tests
1 parent 079219a commit eabe535

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/cloud/network.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ func (c *client) AssociatePublicIPAddress(csCluster *infrav1.CloudStackCluster)
180180

181181
func (c *client) DisassociatePublicIPAddress(csCluster *infrav1.CloudStackCluster) (retErr error) {
182182
// Remove the CAPC creation tag, so it won't be there the next time this address is associated.
183-
c.DeleteCreatedByCAPCTag(ResourceTypeIPAddress, csCluster.Status.PublicIPID)
183+
retErr = c.DeleteCreatedByCAPCTag(ResourceTypeIPAddress, csCluster.Status.PublicIPID)
184+
if retErr != nil {
185+
return retErr
186+
}
184187

185188
p := c.cs.Address.NewDisassociateIpAddressParams(csCluster.Status.PublicIPID)
186189
_, retErr = c.cs.Address.DisassociateIpAddress(p)

pkg/cloud/network_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ var _ = Describe("Network", func() {
8787
createTagsParams := &cloudstack.CreateTagsParams{}
8888
rs.EXPECT().NewListTagsParams().Return(listTagsParams)
8989
rs.EXPECT().ListTags(listTagsParams).Return(&cloudstack.ListTagsResponse{}, nil)
90-
rs.EXPECT().NewCreateTagsParams([]string{networkID}, "network", gomock.Any()).Return(createTagsParams)
90+
rs.EXPECT().NewCreateTagsParams([]string{networkID}, cloud.ResourceTypeNetwork, gomock.Any()).Return(createTagsParams)
9191
rs.EXPECT().CreateTags(createTagsParams).Return(&cloudstack.CreateTagsResponse{}, nil)
9292
}
9393

0 commit comments

Comments
 (0)