Joe Topjian | 929e60b | 2017-02-20 15:31:15 -0700 | [diff] [blame] | 1 | // +build acceptance imageservice images |
| 2 | |
| 3 | package v2 |
| 4 | |
| 5 | import ( |
| 6 | "testing" |
| 7 | |
Krzysztof Szukiełojć | 24a29ce | 2017-05-07 14:24:02 +0200 | [diff] [blame^] | 8 | "gerrit.mcp.mirantis.net/debian/gophercloud.git/acceptance/clients" |
| 9 | "gerrit.mcp.mirantis.net/debian/gophercloud.git/acceptance/tools" |
Joe Topjian | 929e60b | 2017-02-20 15:31:15 -0700 | [diff] [blame] | 10 | ) |
| 11 | |
| 12 | func 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 | } |