Skip to content

Commit e80c291

Browse files
committed
Fix all unit test failures
1 parent 91deba8 commit e80c291

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/cloud/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (c *client) DestroyVMInstance(csMachine *infrav1.CloudStackMachine) error {
216216
p := c.cs.VirtualMachine.NewDestroyVirtualMachineParams(*csMachine.Spec.InstanceID)
217217
p.SetExpunge(true)
218218
_, err := c.cs.VirtualMachine.DestroyVirtualMachine(p)
219-
if err != nil && strings.Contains(err.Error(), "Unable to find UUID for id ") {
219+
if err != nil && strings.Contains(err.Error(), "unable to find UUID for id ") {
220220
// VM doesn't exist. So the desired state is in effect. Our work is done here.
221221
return nil
222222
}

pkg/cloud/network.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (c *client) ResolveNetwork(csCluster *infrav1.CloudStackCluster) (retErr er
6161
func (c *client) GetOrCreateNetwork(csCluster *infrav1.CloudStackCluster) (retErr error) {
6262
if retErr = c.ResolveNetwork(csCluster); retErr == nil { // Found network.
6363
return nil
64-
} else if !strings.Contains(retErr.Error(), "No match found") { // Some other error.
64+
} else if !strings.Contains(retErr.Error(), "no match found") { // Some other error.
6565
return retErr
6666
} // Network not found.
6767

@@ -147,7 +147,7 @@ func (c *client) AssociatePublicIPAddress(csCluster *infrav1.CloudStackCluster)
147147
func (c *client) OpenFirewallRules(csCluster *infrav1.CloudStackCluster) (retErr error) {
148148
p := c.cs.Firewall.NewCreateEgressFirewallRuleParams(csCluster.Status.NetworkID, NetworkProtocolTCP)
149149
_, retErr = c.cs.Firewall.CreateEgressFirewallRule(p)
150-
if retErr != nil && strings.Contains(retErr.Error(), "There is already") { // Already a firewall rule here.
150+
if retErr != nil && strings.Contains(retErr.Error(), "there is already") { // Already a firewall rule here.
151151
retErr = nil
152152
}
153153
return retErr

0 commit comments

Comments
 (0)