diff --git a/openstack/storage/v1/containers/containers_test.go b/openstack/storage/v1/containers/containers_test.go
new file mode 100644
index 0000000..3296bb1
--- /dev/null
+++ b/openstack/storage/v1/containers/containers_test.go
@@ -0,0 +1,78 @@
+package containers
+
+import (
+	"bytes"
+	"encoding/json"
+	"io/ioutil"
+	"net/http"
+	"reflect"
+	"testing"
+)
+
+
+func TestExtractContainerMetadata(t *testing.T) {
+	getResult := &http.Response{}
+
+	expected := map[string]string{}
+
+	actual := ExtractMetadata(getResult)
+
+	if !reflect.DeepEqual(expected, actual) {
+		t.Errorf("Expected: %+v\nActual:%+v", expected, actual)
+	}
+}
+
+func TestExtractContainerInfo(t *testing.T) {
+	responseBody := `
+		[
+			{
+				"count": 3,
+				"bytes": 2000,
+				"name": "artemis"
+			},
+			{
+				"count": 1,
+				"bytes": 450,
+				"name": "diana"
+			}
+		]
+	`
+
+	listResult := &http.Response{
+		Body: ioutil.NopCloser(bytes.NewBufferString(responseBody)),
+	}
+
+	var expected []Container
+	err := json.Unmarshal([]byte(responseBody), &expected)
+	if err != nil {
+		t.Errorf("Error unmarshaling JSON: %s", err)
+	}
+
+	actual, err := ExtractInfo(listResult)
+	if err != nil {
+		t.Errorf("Error extracting containers info: %s", err)
+	}
+
+	if !reflect.DeepEqual(expected, actual) {
+		t.Errorf("\nExpected: %+v\nActual:   %+v", expected, actual)
+	}
+}
+
+func TestExtractConatinerNames(t *testing.T) {
+	responseBody := "artemis\ndiana\n"
+
+	listResult := &http.Response{
+		Body: ioutil.NopCloser(bytes.NewBufferString(responseBody)),
+	}
+
+	expected := []string{"artemis", "diana"}
+
+	actual, err := ExtractNames(listResult)
+	if err != nil {
+		t.Errorf("Error extracting container names: %s", err)
+	}
+
+	if !reflect.DeepEqual(expected, actual) {
+		t.Errorf("Expected: %+v\nActual:%+v", expected, actual)
+	}
+}
diff --git a/openstack/storage/v1/containers/requests_test.go b/openstack/storage/v1/containers/requests_test.go
new file mode 100644
index 0000000..871cb21
--- /dev/null
+++ b/openstack/storage/v1/containers/requests_test.go
@@ -0,0 +1,136 @@
+package containers
+
+import (
+	"net/http"
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/testhelper"
+)
+
+const ( 
+	tokenId = "abcabcabcabc"
+)
+
+var metadata = map[string]string{"gophercloud-test": "containers"}
+
+func serviceClient() *gophercloud.ServiceClient {
+	return &gophercloud.ServiceClient{
+		Provider: &gophercloud.ProviderClient{TokenID: tokenId},
+		Endpoint: testhelper.Endpoint(),
+	}
+}
+
+func TestListContainerInfo(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "GET")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "application/json")
+	})
+
+	client := serviceClient()
+	_, err := List(client, ListOpts{Full: true})
+	if err != nil {
+		t.Fatalf("Unexpected error listing containers info: %v", err)
+	}
+}
+
+func TestListContainerNames(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "GET")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "text/plain")
+	})
+
+	client := serviceClient()
+	_, err := List(client, ListOpts{})
+	if err != nil {
+		t.Fatalf("Unexpected error listing containers info: %v", err)
+	}
+}
+
+func TestCreateContainer(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/testContainer", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "PUT")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "application/json")
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	client := serviceClient()
+	_, err := Create(client, CreateOpts{
+		Name: "testContainer",
+	})
+	if err != nil {
+		t.Fatalf("Unexpected error creating container: %v", err)
+	}
+}
+
+func TestDeleteContainer(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/testContainer", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "DELETE")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "application/json")
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	client := serviceClient()
+	err := Delete(client, DeleteOpts{
+		Name: "testContainer",
+	})
+	if err != nil {
+		t.Fatalf("Unexpected error deleting container: %v", err)
+	}
+}
+
+func TestUpateContainer(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/testContainer", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "POST")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "application/json")
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	client := serviceClient()
+	err := Update(client, UpdateOpts{
+		Name: "testContainer",
+	})
+	if err != nil {
+		t.Fatalf("Unexpected error updating container metadata: %v", err)
+	}
+}
+
+func TestGetContainer(t *testing.T) {
+	testhelper.SetupHTTP()
+	defer testhelper.TeardownHTTP()
+
+	testhelper.Mux.HandleFunc("/testContainer", func(w http.ResponseWriter, r *http.Request) {
+		testhelper.TestMethod(t, r, "HEAD")
+		testhelper.TestHeader(t, r, "X-Auth-Token", tokenId)
+		testhelper.TestHeader(t, r, "Accept", "application/json")
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	client := serviceClient()
+	_, err := Get(client, GetOpts{
+			Name: "testContainer",
+	})
+	if err != nil {
+		t.Fatalf("Unexpected error getting container metadata: %v", err)
+	}
+}
diff --git a/openstack/storage/v1/containers/urls_test.go b/openstack/storage/v1/containers/urls_test.go
new file mode 100644
index 0000000..da37bf6
--- /dev/null
+++ b/openstack/storage/v1/containers/urls_test.go
@@ -0,0 +1,29 @@
+package containers
+
+import (
+	"testing"
+	"github.com/rackspace/gophercloud"
+)
+
+func TestAccountURL(t *testing.T) {
+	client := gophercloud.ServiceClient{
+		Endpoint: "http://localhost:5000/v1/",
+	}
+	expected := "http://localhost:5000/v1/"
+	actual := accountURL(&client)
+	if actual != expected {
+		t.Errorf("Unexpected service URL generated: [%s]", actual)
+	}
+
+}
+
+func TestContainerURL(t *testing.T) {
+	client := gophercloud.ServiceClient{
+		Endpoint: "http://localhost:5000/v1/",
+	}
+	expected := "http://localhost:5000/v1/testContainer"
+	actual := containerURL(&client, "testContainer")
+	if actual != expected {
+		t.Errorf("Unexpected service URL generated: [%s]", actual)
+	}
+}
