CheckServerEquals is no longer needed :fire:
diff --git a/openstack/compute/v2/servers/fixtures.go b/openstack/compute/v2/servers/fixtures.go
index 2ea05e9..7065947 100644
--- a/openstack/compute/v2/servers/fixtures.go
+++ b/openstack/compute/v2/servers/fixtures.go
@@ -1,13 +1,6 @@
// +build fixtures
-
package servers
-import (
- "testing"
-
- th "github.com/rackspace/gophercloud/testhelper"
-)
-
// ServerListBody contains the canned body of a servers.List response.
const ServerListBody = `
{
@@ -335,26 +328,3 @@
Metadata: map[string]interface{}{},
}
)
-
-// CheckServerEquals provides more fine-grained failures when Servers differ, because Server structs
-// are too damn big to compare by eye.
-func CheckServerEquals(t *testing.T, expected Server, actual Server) {
- th.CheckEquals(t, expected.ID, actual.ID)
- th.CheckEquals(t, expected.TenantID, actual.TenantID)
- th.CheckEquals(t, expected.UserID, actual.UserID)
- th.CheckEquals(t, expected.Name, actual.Name)
- th.CheckEquals(t, expected.Updated, actual.Updated)
- th.CheckEquals(t, expected.Created, actual.Created)
- th.CheckEquals(t, expected.HostID, actual.HostID)
- th.CheckEquals(t, expected.Status, actual.Status)
- th.CheckEquals(t, expected.Progress, actual.Progress)
- th.CheckEquals(t, expected.AccessIPv4, actual.AccessIPv4)
- th.CheckEquals(t, expected.AccessIPv6, actual.AccessIPv6)
- th.CheckDeepEquals(t, expected.Image, actual.Image)
- th.CheckDeepEquals(t, expected.Flavor, actual.Flavor)
- th.CheckDeepEquals(t, expected.Addresses, actual.Addresses)
- th.CheckDeepEquals(t, expected.Metadata, actual.Metadata)
- th.CheckDeepEquals(t, expected.Links, actual.Links)
- th.CheckEquals(t, expected.KeyName, actual.KeyName)
- th.CheckEquals(t, expected.AdminPass, actual.AdminPass)
-}
diff --git a/openstack/compute/v2/servers/requests_test.go b/openstack/compute/v2/servers/requests_test.go
index 5e38433..a193674 100644
--- a/openstack/compute/v2/servers/requests_test.go
+++ b/openstack/compute/v2/servers/requests_test.go
@@ -43,8 +43,8 @@
if len(actual) != 2 {
t.Fatalf("Expected 2 servers, got %d", len(actual))
}
- CheckServerEquals(t, ServerHerp, actual[0])
- CheckServerEquals(t, ServerDerp, actual[1])
+ th.CheckDeepEquals(t, ServerHerp, actual[0])
+ th.CheckDeepEquals(t, ServerDerp, actual[1])
return true, nil
})
@@ -86,7 +86,7 @@
t.Fatalf("Unexpected Create error: %v", err)
}
- CheckServerEquals(t, ServerDerp, *actual)
+ th.CheckDeepEquals(t, ServerDerp, *actual)
}
func TestDeleteServer(t *testing.T) {
@@ -125,7 +125,7 @@
t.Fatalf("Unexpected Get error: %v", err)
}
- CheckServerEquals(t, ServerDerp, *actual)
+ th.CheckDeepEquals(t, ServerDerp, *actual)
}
func TestUpdateServer(t *testing.T) {
@@ -148,7 +148,7 @@
t.Fatalf("Unexpected Update error: %v", err)
}
- CheckServerEquals(t, ServerDerp, *actual)
+ th.CheckDeepEquals(t, ServerDerp, *actual)
}
func TestChangeServerAdminPassword(t *testing.T) {
@@ -216,7 +216,7 @@
actual, err := Rebuild(client.ServiceClient(), "1234asdf", opts).Extract()
th.AssertNoErr(t, err)
- CheckServerEquals(t, ServerDerp, *actual)
+ th.CheckDeepEquals(t, ServerDerp, *actual)
}
func TestResizeServer(t *testing.T) {