First crack at acceptance tests
diff --git a/acceptance/rackspace/db/v1/replica_test.go b/acceptance/rackspace/db/v1/replica_test.go
new file mode 100644
index 0000000..96eaf19
--- /dev/null
+++ b/acceptance/rackspace/db/v1/replica_test.go
@@ -0,0 +1,34 @@
+// +build acceptance db
+
+package v1
+
+import (
+ "github.com/rackspace/gophercloud/acceptance/tools"
+ "github.com/rackspace/gophercloud/rackspace/db/v1/instances"
+ th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func (c context) createReplica() {
+ repl, err := instances.Create(c.client, opts).Extract()
+
+ opts := instances.CreateOpts{
+ FlavorRef: "1",
+ Size: 1,
+ Name: tools.RandomString("gopher_db", 5),
+ ReplicaOf: c.instanceID,
+ }
+
+ instance, err := instances.Create(c.client, opts).Extract()
+ th.AssertNoErr(c.test, err)
+
+ c.Logf("Creating replica of %s. Waiting...", c.instanceID)
+ c.WaitUntilActive(id)
+ c.Logf("Created replica %#v", repl)
+
+ c.replicaID = repl.ID
+}
+
+func (c context) detachReplica() {
+ err := instances.DetachReplica(c.client, c.replicaID).ExtractErr()
+ c.Logf("Detached replica %s", c.replicaID)
+}