diff --git a/acceptance/rackspace/objectstorage/v1/accounts_test.go b/acceptance/rackspace/objectstorage/v1/accounts_test.go
new file mode 100644
index 0000000..3a05646
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/accounts_test.go
@@ -0,0 +1,37 @@
+// +build acceptance rackspace
+
+package v1
+
+import (
+	"testing"
+
+	raxAccounts "github.com/rackspace/gophercloud/rackspace/objectstorage/v1/accounts"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestAccounts(t *testing.T) {
+	c, err := createClient(t, false)
+	th.AssertNoErr(t, err)
+
+	headers, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": "mountains"}}).ExtractHeaders()
+	th.AssertNoErr(t, err)
+	t.Logf("Headers from Update Account request: %+v\n", headers)
+	defer func() {
+		_, err := raxAccounts.Update(c, raxAccounts.UpdateOpts{Metadata: map[string]string{"white": ""}}).ExtractHeaders()
+		th.AssertNoErr(t, err)
+		metadata, err := raxAccounts.Get(c).ExtractMetadata()
+		th.AssertNoErr(t, err)
+		t.Logf("Metadata from Get Account request (after update reverted): %+v\n", metadata)
+		th.CheckEquals(t, metadata["White"], "")
+	}()
+
+	getResult := raxAccounts.Get(c)
+	headers, err = getResult.ExtractHeaders()
+	th.AssertNoErr(t, err)
+	t.Logf("Headers from Get Account request (after update): %+v\n", headers)
+	metadata, err := getResult.ExtractMetadata()
+	th.AssertNoErr(t, err)
+	t.Logf("Metadata from Get Account request (after update): %+v\n", metadata)
+
+	th.CheckEquals(t, metadata["White"], "mountains")
+}
diff --git a/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go b/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go
new file mode 100644
index 0000000..b7b1f99
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/cdncontainers_test.go
@@ -0,0 +1 @@
+package v1
diff --git a/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go b/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go
new file mode 100644
index 0000000..b7b1f99
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/cdnobjects_test.go
@@ -0,0 +1 @@
+package v1
diff --git a/acceptance/rackspace/objectstorage/v1/common.go b/acceptance/rackspace/objectstorage/v1/common.go
new file mode 100644
index 0000000..0b4d170
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/common.go
@@ -0,0 +1,54 @@
+// +build acceptance rackspace
+
+package v1
+
+import (
+	"os"
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/rackspace"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func rackspaceAuthOptions(t *testing.T) gophercloud.AuthOptions {
+	// Obtain credentials from the environment.
+	options := gophercloud.AuthOptions{
+		Username: os.Getenv("RS_USERNAME"),
+		APIKey:   os.Getenv("RS_APIKEY"),
+	}
+
+	if options.Username == "" {
+		t.Fatal("Please provide a Rackspace username as RS_USERNAME.")
+	}
+	if options.APIKey == "" {
+		t.Fatal("Please provide a Rackspace API key as RS_APIKEY.")
+	}
+
+	return options
+}
+
+func createClient(t *testing.T, cdn bool) (*gophercloud.ServiceClient, error) {
+	region := os.Getenv("RS_REGION")
+	if region == "" {
+		t.Fatal("Please provide a Rackspace region as RS_REGION")
+	}
+
+	ao := rackspaceAuthOptions(t)
+
+	provider, err := rackspace.NewClient(ao.IdentityEndpoint)
+	th.AssertNoErr(t, err)
+
+	err = rackspace.Authenticate(provider, ao)
+	th.AssertNoErr(t, err)
+
+	if cdn {
+		return rackspace.NewObjectCDNV1(provider, gophercloud.EndpointOpts{
+			Region: region,
+		})
+	}
+
+	return rackspace.NewObjectStorageV1(provider, gophercloud.EndpointOpts{
+		Region: region,
+	})
+}
diff --git a/acceptance/rackspace/objectstorage/v1/containers_test.go b/acceptance/rackspace/objectstorage/v1/containers_test.go
new file mode 100644
index 0000000..1e8ee36
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/containers_test.go
@@ -0,0 +1,87 @@
+// +build acceptance rackspace
+
+package v1
+
+import (
+	"testing"
+
+	osContainers "github.com/rackspace/gophercloud/openstack/objectstorage/v1/containers"
+	"github.com/rackspace/gophercloud/pagination"
+	raxContainers "github.com/rackspace/gophercloud/rackspace/objectstorage/v1/containers"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestContainers(t *testing.T) {
+	c, err := createClient(t, false)
+	th.AssertNoErr(t, err)
+
+	t.Logf("Containers Info available to the currently issued token:")
+	count := 0
+	err = raxContainers.List(c, &osContainers.ListOpts{Full: true}).EachPage(func(page pagination.Page) (bool, error) {
+		t.Logf("--- Page %02d ---", count)
+
+		containers, err := raxContainers.ExtractInfo(page)
+		th.AssertNoErr(t, err)
+
+		for i, container := range containers {
+			t.Logf("[%02d]      name=[%s]", i, container.Name)
+			t.Logf("            count=[%d]", container.Count)
+			t.Logf("            bytes=[%d]", container.Bytes)
+		}
+
+		count++
+		return true, nil
+	})
+	th.AssertNoErr(t, err)
+	if count == 0 {
+		t.Errorf("No containers listed for your current token.")
+	}
+
+	t.Logf("Container Names available to the currently issued token:")
+	count = 0
+	err = raxContainers.List(c, &osContainers.ListOpts{Full: false}).EachPage(func(page pagination.Page) (bool, error) {
+		t.Logf("--- Page %02d ---", count)
+
+		names, err := raxContainers.ExtractNames(page)
+		th.AssertNoErr(t, err)
+
+		for i, name := range names {
+			t.Logf("[%02d] %s", i, name)
+		}
+
+		count++
+		return true, nil
+	})
+	th.AssertNoErr(t, err)
+	if count == 0 {
+		t.Errorf("No containers listed for your current token.")
+	}
+
+	headers, err := raxContainers.Create(c, "gophercloud-test", nil).ExtractHeaders()
+	th.AssertNoErr(t, err)
+	defer func() {
+		_, err := raxContainers.Delete(c, "gophercloud-test").ExtractHeaders()
+		th.AssertNoErr(t, err)
+	}()
+
+	headers, err = raxContainers.Update(c, "gophercloud-test", raxContainers.UpdateOpts{Metadata: map[string]string{"white": "mountains"}}).ExtractHeaders()
+	th.AssertNoErr(t, err)
+	t.Logf("Headers from Update Account request: %+v\n", headers)
+	defer func() {
+		_, err := raxContainers.Update(c, "gophercloud-test", raxContainers.UpdateOpts{Metadata: map[string]string{"white": ""}}).ExtractHeaders()
+		th.AssertNoErr(t, err)
+		metadata, err := raxContainers.Get(c, "gophercloud-test").ExtractMetadata()
+		th.AssertNoErr(t, err)
+		t.Logf("Metadata from Get Account request (after update reverted): %+v\n", metadata)
+		th.CheckEquals(t, metadata["White"], "")
+	}()
+
+	getResult := raxContainers.Get(c, "gophercloud-test")
+	headers, err = getResult.ExtractHeaders()
+	th.AssertNoErr(t, err)
+	t.Logf("Headers from Get Account request (after update): %+v\n", headers)
+	metadata, err := getResult.ExtractMetadata()
+	th.AssertNoErr(t, err)
+	t.Logf("Metadata from Get Account request (after update): %+v\n", metadata)
+	th.CheckEquals(t, metadata["White"], "mountains")
+}
diff --git a/acceptance/rackspace/objectstorage/v1/objects_test.go b/acceptance/rackspace/objectstorage/v1/objects_test.go
new file mode 100644
index 0000000..b7b1f99
--- /dev/null
+++ b/acceptance/rackspace/objectstorage/v1/objects_test.go
@@ -0,0 +1 @@
+package v1
