Skip to content

Commit

Permalink
r/host_virtual_switch: Small test readability fix for missing case
Browse files Browse the repository at this point in the history
Change !expected to expected == false, to be more explicit.
  • Loading branch information
vancluever committed Aug 31, 2017
1 parent b061d07 commit 26ce39a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vsphere/resource_vsphere_host_virtual_switch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func testAccResourceVSphereHostVirtualSwitchExists(expected bool) resource.TestC

_, err = hostVSwitchFromName(vars.client, ns, name)
if err != nil {
if err.Error() == fmt.Sprintf("could not find virtual switch %s", name) && !expected {
if err.Error() == fmt.Sprintf("could not find virtual switch %s", name) && expected == false {
// Expected missing
return nil
}
Expand Down

0 comments on commit 26ce39a

Please # to comment.