github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/blockstorage/v2/availabilityzones/testing/requests_test.go (about) 1 package testing 2 3 import ( 4 "context" 5 "testing" 6 7 az "github.com/vnpaycloud-console/gophercloud/v2/openstack/blockstorage/v2/availabilityzones" 8 th "github.com/vnpaycloud-console/gophercloud/v2/testhelper" 9 "github.com/vnpaycloud-console/gophercloud/v2/testhelper/client" 10 ) 11 12 // Verifies that availability zones can be listed correctly 13 func TestList(t *testing.T) { 14 th.SetupHTTP() 15 defer th.TeardownHTTP() 16 17 HandleGetSuccessfully(t) 18 19 allPages, err := az.List(client.ServiceClient()).AllPages(context.TODO()) 20 th.AssertNoErr(t, err) 21 22 actual, err := az.ExtractAvailabilityZones(allPages) 23 th.AssertNoErr(t, err) 24 25 th.CheckDeepEquals(t, AZResult, actual) 26 }