Finalizing most acceptance tests
diff --git a/acceptance/openstack/db/v1/database_test.go b/acceptance/openstack/db/v1/database_test.go
index e2d41cf..cecd9c9 100644
--- a/acceptance/openstack/db/v1/database_test.go
+++ b/acceptance/openstack/db/v1/database_test.go
@@ -10,9 +10,9 @@
func (c context) createDBs() {
dbs := []string{
- tools.RandomString("db_"),
- tools.RandomString("db_"),
- tools.RandomString("db_"),
+ tools.RandomString("db_", 5),
+ tools.RandomString("db_", 5),
+ tools.RandomString("db_", 5),
}
opts := db.BatchCreateOpts{
@@ -21,7 +21,8 @@
db.CreateOpts{Name: dbs[2]},
}
- res := db.Create(c.client, c.instanceID, opts)
+ 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
}
@@ -29,7 +30,7 @@
func (c context) listDBs() {
c.Logf("Listing databases on instance %s", c.instanceID)
- err := dbs.List(c.client, c.instanceID).EachPage(func(page pagination.Page) (bool, error) {
+ err := db.List(c.client, c.instanceID).EachPage(func(page pagination.Page) (bool, error) {
dbList, err := db.ExtractDBs(page)
c.AssertNoErr(err)
@@ -40,13 +41,13 @@
return true, nil
})
- c.CheckNoErr(err)
+ c.AssertNoErr(err)
}
func (c context) deleteDBs() {
for _, id := range c.DBIDs {
err := db.Delete(c.client, c.instanceID, id).ExtractErr()
- c.CheckNoErr(err)
- t.Logf("Deleted DB %s", id)
+ c.AssertNoErr(err)
+ c.Logf("Deleted DB %s", id)
}
}