func TestGetFlavor(t *testing.T) { th.SetupHTTP() defer th.TeardownHTTP() HandleGet(t) actual, err := flavors.Get(fake.ServiceClient(), flavorID).Extract() th.AssertNoErr(t, err) expected := &flavors.Flavor{ ID: 1, Name: "m1.tiny", RAM: 512, Links: []gophercloud.Link{ {Href: "https://openstack.example.com/v1.0/1234/flavors/1", Rel: "self"}, }, } th.AssertDeepEquals(t, expected, actual) }
func (c context) getFlavor() { flavor, err := flavors.Get(c.client, "1").Extract() c.Logf("Getting flavor %s", flavor.ID) c.AssertNoErr(err) }