diff --git a/acceptance/rackspace/blockstorage/v1/snapshot_test.go b/acceptance/rackspace/blockstorage/v1/snapshot_test.go
index b7b1f99..212e7a7 100644
--- a/acceptance/rackspace/blockstorage/v1/snapshot_test.go
+++ b/acceptance/rackspace/blockstorage/v1/snapshot_test.go
@@ -1 +1,80 @@
 package v1
+
+import (
+	"testing"
+	"time"
+
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/pagination"
+	"github.com/rackspace/gophercloud/rackspace/blockstorage/v1/snapshots"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestSnapshots(t *testing.T) {
+	client := setup(t)
+	volID := testVolumeCreate(t, client)
+
+	t.Log("Creating snapshots")
+	s := testSnapshotCreate(t, client, volID)
+	id := s.ID
+
+	t.Log("Listing snapshots")
+	testSnapshotList(t, client)
+
+	t.Logf("Getting snapshot %s", id)
+	testSnapshotGet(t, client, id)
+
+	t.Logf("Updating snapshot %s", id)
+	testSnapshotUpdate(t, client, id)
+
+	t.Logf("Deleting snapshot %s", id)
+	testSnapshotDelete(t, client, id)
+	s.WaitUntilDeleted(client, -1)
+
+	t.Logf("Deleting volume %s", volID)
+	testVolumeDelete(t, client, volID)
+}
+
+func testSnapshotCreate(t *testing.T, client *gophercloud.ServiceClient, volID string) *snapshots.Snapshot {
+	opts := snapshots.CreateOpts{VolumeID: volID, Name: "snapshot-001"}
+	s, err := snapshots.Create(client, opts).Extract()
+	th.AssertNoErr(t, err)
+	t.Logf("Created snapshot %s", s.ID)
+
+	t.Logf("Waiting for new snapshot to become available...")
+	start := time.Now().Second()
+	s.WaitUntilComplete(client, -1)
+	t.Logf("Snapshot completed after %ds", time.Now().Second()-start)
+
+	return s
+}
+
+func testSnapshotList(t *testing.T, client *gophercloud.ServiceClient) {
+	snapshots.List(client).EachPage(func(page pagination.Page) (bool, error) {
+		sList, err := snapshots.ExtractSnapshots(page)
+		th.AssertNoErr(t, err)
+
+		for _, s := range sList {
+			t.Logf("Snapshot: ID [%s] Name [%s] Volume ID [%s] Progress [%s] Created [%s]",
+				s.ID, s.Name, s.VolumeID, s.Progress, s.CreatedAt)
+		}
+
+		return true, nil
+	})
+}
+
+func testSnapshotGet(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	_, err := snapshots.Get(client, id).Extract()
+	th.AssertNoErr(t, err)
+}
+
+func testSnapshotUpdate(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	_, err := snapshots.Update(client, id, snapshots.UpdateOpts{Name: "new_name"}).Extract()
+	th.AssertNoErr(t, err)
+}
+
+func testSnapshotDelete(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	err := snapshots.Delete(client, id)
+	th.AssertNoErr(t, err)
+	t.Logf("Deleted snapshot %s", id)
+}
diff --git a/acceptance/rackspace/blockstorage/v1/volume_test.go b/acceptance/rackspace/blockstorage/v1/volume_test.go
index b7b1f99..f61af76 100644
--- a/acceptance/rackspace/blockstorage/v1/volume_test.go
+++ b/acceptance/rackspace/blockstorage/v1/volume_test.go
@@ -1 +1,69 @@
 package v1
+
+import (
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	os "github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumes"
+	"github.com/rackspace/gophercloud/pagination"
+	"github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestVolumes(t *testing.T) {
+	client := setup(t)
+
+	t.Logf("Listing volumes")
+	testVolumeList(t, client)
+
+	t.Logf("Creating volume")
+	volumeID := testVolumeCreate(t, client)
+
+	t.Logf("Getting volume %s", volumeID)
+	testVolumeGet(t, client, volumeID)
+
+	t.Logf("Updating volume %s", volumeID)
+	testVolumeUpdate(t, client, volumeID)
+
+	t.Logf("Deleting volume %s", volumeID)
+	testVolumeDelete(t, client, volumeID)
+}
+
+func testVolumeList(t *testing.T, client *gophercloud.ServiceClient) {
+	volumes.List(client).EachPage(func(page pagination.Page) (bool, error) {
+		vList, err := volumes.ExtractVolumes(page)
+		th.AssertNoErr(t, err)
+
+		for _, v := range vList {
+			t.Logf("Volume: ID [%s] Name [%s] Type [%s] Created [%s]", v.ID, v.Name,
+				v.VolumeType, v.CreatedAt)
+		}
+
+		return true, nil
+	})
+}
+
+func testVolumeCreate(t *testing.T, client *gophercloud.ServiceClient) string {
+	vol, err := volumes.Create(client, os.CreateOpts{Size: 75}).Extract()
+	th.AssertNoErr(t, err)
+	t.Logf("Created volume: ID [%s] Size [%s]", vol.ID, vol.Size)
+	return vol.ID
+}
+
+func testVolumeGet(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	vol, err := volumes.Get(client, id).Extract()
+	th.AssertNoErr(t, err)
+	t.Logf("Created volume: ID [%s] Size [%s]", vol.ID, vol.Size)
+}
+
+func testVolumeUpdate(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	vol, err := volumes.Update(client, id, volumes.UpdateOpts{Name: "new_name"}).Extract()
+	th.AssertNoErr(t, err)
+	t.Logf("Created volume: ID [%s] Name [%s]", vol.ID, vol.Name)
+}
+
+func testVolumeDelete(t *testing.T, client *gophercloud.ServiceClient, id string) {
+	err := volumes.Delete(client, id)
+	th.AssertNoErr(t, err)
+	t.Logf("Deleted volume %s", id)
+}
