You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It("returns a govmomi client", func() {
expectedClient:=new(govmomi.Client)
actualClient:=packageundertest.Configure()
Expect(actualClient).To(BeAssignableToTypeOf(expectedClient))
})
Test output:
returns a govmomi client [It]
/Users/pivotal/go/src/github.com/rowanjacobs/terraform-provider-vsphereovf/vsphereovf/provider_test.go:68
Refusing to compare <nil> to <nil>.
Be explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously
uninitialized.
This confuses us since expectedClient is not actually nil (printing it and its address confirms this).
The text was updated successfully, but these errors were encountered:
)
* AssignableToTypeOf returns false without error
if exactly one of actual or expected is nil.
Fixes#280.
Signed-off-by: Rowan Jacobs <rojacobs@pivotal.io>
* error when actual is not nil and expected is nil
Signed-off-by: Rowan Jacobs <rojacobs@pivotal.io>
The relevant lines of code are here.
Our code under test:
Our test:
Test output:
This confuses us since
expectedClient
is not actually nil (printing it and its address confirms this).The text was updated successfully, but these errors were encountered: