update volume
diff --git a/acceptance/openstack/blockstorage/v1/volumes_test.go b/acceptance/openstack/blockstorage/v1/volumes_test.go
index 145fde0..0d773db 100644
--- a/acceptance/openstack/blockstorage/v1/volumes_test.go
+++ b/acceptance/openstack/blockstorage/v1/volumes_test.go
@@ -42,7 +42,7 @@
var cv *volumes.Volume
for i := 0; i < numVols; i++ {
- cv, err = volumes.Create(client, volumes.VolumeOpts{
+ cv, err = volumes.Create(client, volumes.CreateOpts{
Size: 1,
Name: "gophercloud-test-volume-" + strconv.Itoa(i),
})
@@ -61,6 +61,14 @@
}
+ _, err = volumes.Update(client, cv.ID, volumes.UpdateOpts{
+ Name: "gophercloud-updated-volume",
+ })
+ if err != nil {
+ t.Error(err)
+ return
+ }
+
gr, err := volumes.Get(client, cv.ID)
if err != nil {
t.Error(err)
@@ -73,6 +81,10 @@
}
fmt.Printf("Got volume: %+v\n", v)
+ if v.Name != "gophercloud-updated-volume" {
+ t.Errorf("Unable to update volume: Expected name: gophercloud-updated-volume\nActual name: %s", v.Name)
+ }
+
pager := volumes.List(client, volumes.ListOpts{})
if err != nil {
t.Error(err)