format Object struct; change apostrophe to quotation mark in unit test
diff --git a/openstack/objectstorage/v1/containers/requests_test.go b/openstack/objectstorage/v1/containers/requests_test.go
index 0f1a9a1..8ec1733 100644
--- a/openstack/objectstorage/v1/containers/requests_test.go
+++ b/openstack/objectstorage/v1/containers/requests_test.go
@@ -79,8 +79,6 @@
},
}
- t.Logf("actual: %+v/n", actual)
-
testhelper.CheckDeepEquals(t, expected, actual)
return true, nil
diff --git a/openstack/objectstorage/v1/objects/requests_test.go b/openstack/objectstorage/v1/objects/requests_test.go
index 6f61a98..6747544 100644
--- a/openstack/objectstorage/v1/objects/requests_test.go
+++ b/openstack/objectstorage/v1/objects/requests_test.go
@@ -65,7 +65,7 @@
"hash": "451e372e48e0f6b1114fa0724aa79fa1",
"last_modified": "2009-11-10 23:00:00 +0000 UTC",
"bytes": 14,
- "name": 'goodbye",
+ "name": "goodbye",
"content_type": "application/octet-stream"
},
{
@@ -85,7 +85,7 @@
client := serviceClient()
count := 0
- List(client, "testContainer", &ListOpts{Full: true}).EachPage(func(page pagination.Page) (bool, error) {
+ err := List(client, "testContainer", &ListOpts{Full: true}).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractInfo(page)
if err != nil {
@@ -110,10 +110,13 @@
},
}
- testhelper.CheckDeepEquals(t, expected, actual)
+ testhelper.CheckDeepEquals(t, actual, expected)
return true, nil
})
+ if err != nil {
+ t.Error(err)
+ }
if count != 1 {
t.Errorf("Expected 1 page, got %d", count)
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index 14435b9..cab0dfb 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -12,11 +12,11 @@
// Object is a structure that holds information related to a storage object.
type Object struct {
- Bytes int `json:"bytes" mapstructure:"bytes"`
- ContentType string `json:"content_type" mapstructure:"content_type"`
- Hash string `json:"hash" mapstructure:"hash"`
- LastModified string `json:"last_modified" mapstructure:"last_modified"`
- Name string `json:"name" mapstructure:"name"`
+ Bytes int `json:"bytes" mapstructure:"bytes"`
+ ContentType string `json:"content_type" mapstructure:"content_type"`
+ Hash string `json:"hash" mapstructure:"hash"`
+ LastModified string `json:"last_modified" mapstructure:"last_modified"`
+ Name string `json:"name" mapstructure:"name"`
}
// ListResult is a single page of objects that is returned from a call to the List function.