blob: aa0390bd11a3ba1aa6e1fdbd4d62d2c521064a6b [file] [log] [blame]
Joe Topjian929e60b2017-02-20 15:31:15 -07001// +build acceptance imageservice images
2
3package v2
4
5import (
6 "testing"
7
8 "github.com/gophercloud/gophercloud/acceptance/clients"
9 "github.com/gophercloud/gophercloud/acceptance/tools"
10)
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}