Stricter err checking
diff --git a/rackspace/blockstorage/v1/snapshots/delegate_test.go b/rackspace/blockstorage/v1/snapshots/delegate_test.go
index 5c027a2..fad7636 100644
--- a/rackspace/blockstorage/v1/snapshots/delegate_test.go
+++ b/rackspace/blockstorage/v1/snapshots/delegate_test.go
@@ -30,7 +30,7 @@
count := 0
- List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+ err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractSnapshots(page)
if err != nil {
@@ -54,9 +54,8 @@
return true, nil
})
- if count != 1 {
- t.Errorf("Expected 1 page, got %d", count)
- }
+ th.AssertEquals(t, 1, count)
+ th.AssertNoErr(t, err)
}
func TestGet(t *testing.T) {
diff --git a/rackspace/blockstorage/v1/volumes/delegate_test.go b/rackspace/blockstorage/v1/volumes/delegate_test.go
index 56b86bd..2b9809f 100644
--- a/rackspace/blockstorage/v1/volumes/delegate_test.go
+++ b/rackspace/blockstorage/v1/volumes/delegate_test.go
@@ -17,7 +17,7 @@
count := 0
- List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+ err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractVolumes(page)
if err != nil {
@@ -41,9 +41,8 @@
return true, nil
})
- if count != 1 {
- t.Errorf("Expected 1 page, got %d", count)
- }
+ th.AssertEquals(t, 1, count)
+ th.AssertNoErr(t, err)
}
func TestGet(t *testing.T) {
diff --git a/rackspace/blockstorage/v1/volumetypes/delegate_test.go b/rackspace/blockstorage/v1/volumetypes/delegate_test.go
index aa042a7..6e65c90 100644
--- a/rackspace/blockstorage/v1/volumetypes/delegate_test.go
+++ b/rackspace/blockstorage/v1/volumetypes/delegate_test.go
@@ -17,7 +17,7 @@
count := 0
- List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
+ err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractVolumeTypes(page)
if err != nil {
@@ -45,9 +45,8 @@
return true, nil
})
- if count != 1 {
- t.Errorf("Expected 1 page, got %d", count)
- }
+ th.AssertEquals(t, 1, count)
+ th.AssertNoErr(t, err)
}
func TestGet(t *testing.T) {