blob: ed5d7cce816617619f61919ef95460f983545092 [file] [log] [blame]
Mikko Valkonen9368c002017-01-16 18:31:39 +02001package v2
2
3import (
4 "github.com/gophercloud/gophercloud/acceptance/clients"
5 "github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares"
6 "testing"
7)
8
9func TestShareCreate(t *testing.T) {
10 client, err := clients.NewSharedFileSystemV2Client()
11 if err != nil {
12 t.Fatalf("Unable to create a sharedfs client: %v", err)
13 }
14
15 share, err := CreateShare(t, client)
16 if err != nil {
17 t.Fatalf("Unable to create a share: %v", err)
18 }
19
20 defer DeleteShare(t, client, share)
21
22 created, err := shares.Get(client, share.ID).Extract()
23 if err != nil {
24 t.Errorf("Unable to retrieve share: %v", err)
25 }
26 PrintShare(t, created)
27}