blob: 5fe1c16d22077afe9f2c0ed23b9689a4a286f63a [file] [log] [blame]
Joe Topjian929e60b2017-02-20 15:31:15 -07001// +build acceptance imageservice images
2
3package v2
4
5import (
6 "testing"
7
Krzysztof Szukiełojć24a29ce2017-05-07 14:24:02 +02008 "gerrit.mcp.mirantis.net/debian/gophercloud.git/acceptance/clients"
9 "gerrit.mcp.mirantis.net/debian/gophercloud.git/acceptance/tools"
Joe Topjian929e60b2017-02-20 15:31:15 -070010)
11
12func TestImagesCreateDestroyEmptyImage(t *testing.T) {
13 client, err := clients.NewImageServiceV2Client()
14 if err != nil {
15 t.Fatalf("Unable to create an image service client: %v", err)
16 }
17
18 image, err := CreateEmptyImage(t, client)
19 if err != nil {
20 t.Fatalf("Unable to create empty image: %v", err)
21 }
22
23 defer DeleteImage(t, client, image)
24
25 tools.PrintResource(t, image)
26}