ImageService v2: Fixing Create Properties (#264)
* Fix Creating Image Properties
The combination of JSON tags were not rendering the JSON body
correctly and causing a 400 error by the API.
* ImageService v2 Acceptance Tests
* unit tests
diff --git a/acceptance/openstack/imageservice/v2/images_test.go b/acceptance/openstack/imageservice/v2/images_test.go
new file mode 100644
index 0000000..aa0390b
--- /dev/null
+++ b/acceptance/openstack/imageservice/v2/images_test.go
@@ -0,0 +1,26 @@
+// +build acceptance imageservice images
+
+package v2
+
+import (
+ "testing"
+
+ "github.com/gophercloud/gophercloud/acceptance/clients"
+ "github.com/gophercloud/gophercloud/acceptance/tools"
+)
+
+func TestImagesCreateDestroyEmptyImage(t *testing.T) {
+ client, err := clients.NewImageServiceV2Client()
+ if err != nil {
+ t.Fatalf("Unable to create an image service client: %v", err)
+ }
+
+ image, err := CreateEmptyImage(t, client)
+ if err != nil {
+ t.Fatalf("Unable to create empty image: %v", err)
+ }
+
+ defer DeleteImage(t, client, image)
+
+ tools.PrintResource(t, image)
+}