changes to acceptance tests
diff --git a/acceptance/openstack/db/v1/database_test.go b/acceptance/openstack/db/v1/database_test.go
index cecd9c9..2fd3175 100644
--- a/acceptance/openstack/db/v1/database_test.go
+++ b/acceptance/openstack/db/v1/database_test.go
@@ -3,28 +3,20 @@
package v1
import (
- "github.com/rackspace/gophercloud/acceptance/tools"
db "github.com/rackspace/gophercloud/openstack/db/v1/databases"
"github.com/rackspace/gophercloud/pagination"
)
func (c context) createDBs() {
- dbs := []string{
- tools.RandomString("db_", 5),
- tools.RandomString("db_", 5),
- tools.RandomString("db_", 5),
- }
-
opts := db.BatchCreateOpts{
- db.CreateOpts{Name: dbs[0]},
- db.CreateOpts{Name: dbs[1]},
- db.CreateOpts{Name: dbs[2]},
+ db.CreateOpts{Name: "db1"},
+ db.CreateOpts{Name: "db2"},
+ db.CreateOpts{Name: "db3"},
}
err := db.Create(c.client, c.instanceID, opts).ExtractErr()
c.AssertNoErr(err)
- c.Logf("Created three databases on instance %s: %s, %s, %s", c.instanceID, dbs[0], dbs[1], dbs[2])
- c.DBIDs = dbs
+ c.Logf("Created three databases on instance %s: db1, db2, db3", c.instanceID)
}
func (c context) listDBs() {
@@ -45,7 +37,7 @@
}
func (c context) deleteDBs() {
- for _, id := range c.DBIDs {
+ for _, id := range []string{"db1", "db2", "db3"} {
err := db.Delete(c.client, c.instanceID, id).ExtractErr()
c.AssertNoErr(err)
c.Logf("Deleted DB %s", id)
diff --git a/acceptance/openstack/db/v1/instance_test.go b/acceptance/openstack/db/v1/instance_test.go
index 184f0f6..253044c 100644
--- a/acceptance/openstack/db/v1/instance_test.go
+++ b/acceptance/openstack/db/v1/instance_test.go
@@ -22,17 +22,15 @@
c.getFlavor()
// INSTANCE tests
- //c.createInstance()
- c.instanceID = "dbf901f4-fe23-48b7-8c1d-ee60ec85a660"
-
+ c.createInstance()
c.listInstances()
c.getInstance()
c.isRootEnabled()
c.enableRootUser()
c.isRootEnabled()
c.restartInstance()
- c.resizeInstance()
- c.resizeVol()
+ //c.resizeInstance()
+ //c.resizeVol()
// DATABASE tests
c.createDBs()
@@ -54,8 +52,8 @@
}
opts := instances.CreateOpts{
- FlavorRef: "1",
- Size: 1,
+ FlavorRef: "2",
+ Size: 5,
Name: tools.RandomString("gopher_db", 5),
Datastore: &instances.DatastoreOpts{Type: os.Getenv(envDSType)},
}
@@ -123,7 +121,7 @@
func (c context) resizeInstance() {
id := c.instanceID
- err := instances.ResizeInstance(c.client, id, "2").ExtractErr()
+ err := instances.ResizeInstance(c.client, id, "3").ExtractErr()
c.AssertNoErr(err)
c.Logf("Resizing %s. Waiting...", id)
c.WaitUntilActive(id)
@@ -132,7 +130,7 @@
func (c context) resizeVol() {
id := c.instanceID
- err := instances.ResizeVolume(c.client, id, 2).ExtractErr()
+ err := instances.ResizeVolume(c.client, id, 4).ExtractErr()
c.AssertNoErr(err)
c.Logf("Resizing volume of %s. Waiting...", id)
c.WaitUntilActive(id)
diff --git a/acceptance/openstack/db/v1/user_test.go b/acceptance/openstack/db/v1/user_test.go
index b731469..25a4794 100644
--- a/acceptance/openstack/db/v1/user_test.go
+++ b/acceptance/openstack/db/v1/user_test.go
@@ -16,9 +16,9 @@
tools.RandomString("user_", 5),
}
- db1 := db.CreateOpts{Name: c.DBIDs[0]}
- db2 := db.CreateOpts{Name: c.DBIDs[1]}
- db3 := db.CreateOpts{Name: c.DBIDs[2]}
+ db1 := db.CreateOpts{Name: "db1"}
+ db2 := db.CreateOpts{Name: "db2"}
+ db3 := db.CreateOpts{Name: "db3"}
opts := u.BatchCreateOpts{
u.CreateOpts{