requests_test.go 546 B

12345678910111213141516171819202122
  1. package testing
  2. import (
  3. "testing"
  4. "devel.mephi.ru/iacherepanov/openstack-gophercloud/openstack/orchestration/v1/buildinfo"
  5. th "devel.mephi.ru/iacherepanov/openstack-gophercloud/testhelper"
  6. fake "devel.mephi.ru/iacherepanov/openstack-gophercloud/testhelper/client"
  7. )
  8. func TestGetTemplate(t *testing.T) {
  9. th.SetupHTTP()
  10. defer th.TeardownHTTP()
  11. HandleGetSuccessfully(t, GetOutput)
  12. actual, err := buildinfo.Get(fake.ServiceClient()).Extract()
  13. th.AssertNoErr(t, err)
  14. expected := GetExpected
  15. th.AssertDeepEquals(t, expected, actual)
  16. }