github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/compute/v2/limits/testing/requests_test.go (about) 1 package testing 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/vnpaycloud-console/gophercloud/v2/openstack/compute/v2/limits" 8 th "github.com/vnpaycloud-console/gophercloud/v2/testhelper" 9 "github.com/vnpaycloud-console/gophercloud/v2/testhelper/client" 10 ) 11 12 func TestGet(t *testing.T) { 13 th.SetupHTTP() 14 defer th.TeardownHTTP() 15 HandleGetSuccessfully(t) 16 17 getOpts := limits.GetOpts{ 18 TenantID: TenantID, 19 } 20 21 actual, err := limits.Get(context.TODO(), client.ServiceClient(), getOpts).Extract() 22 th.AssertNoErr(t, err) 23 th.CheckDeepEquals(t, &LimitsResult, actual) 24 }