Finalizing most acceptance tests
diff --git a/acceptance/openstack/db/v1/user_test.go b/acceptance/openstack/db/v1/user_test.go
index 9870419..b731469 100644
--- a/acceptance/openstack/db/v1/user_test.go
+++ b/acceptance/openstack/db/v1/user_test.go
@@ -11,34 +11,35 @@
func (c context) createUsers() {
users := []string{
- tools.RandomString("user_"),
- tools.RandomString("user_"),
- tools.RandomString("user_"),
+ tools.RandomString("user_", 5),
+ tools.RandomString("user_", 5),
+ tools.RandomString("user_", 5),
}
- db1 := db.CreateOpt{Name: c.DBIDs[0]}
- db2 := db.CreateOpt{Name: c.DBIDs[1]}
- db3 := db.CreateOpt{Name: c.DBIDs[2]}
+ db1 := db.CreateOpts{Name: c.DBIDs[0]}
+ db2 := db.CreateOpts{Name: c.DBIDs[1]}
+ db3 := db.CreateOpts{Name: c.DBIDs[2]}
opts := u.BatchCreateOpts{
u.CreateOpts{
Name: users[0],
- Password: tools.RandomString(),
- databases: db.BatchCreateOpts{db1, db2, db3},
+ Password: tools.RandomString("", 5),
+ Databases: db.BatchCreateOpts{db1, db2, db3},
},
u.CreateOpts{
Name: users[1],
- Password: tools.RandomString(),
- databases: db.BatchCreateOpts{db1, db2},
+ Password: tools.RandomString("", 5),
+ Databases: db.BatchCreateOpts{db1, db2},
},
u.CreateOpts{
Name: users[2],
- Password: tools.RandomString(),
- databases: db.BatchCreateOpts{db3},
+ Password: tools.RandomString("", 5),
+ Databases: db.BatchCreateOpts{db3},
},
}
err := u.Create(c.client, c.instanceID, opts).ExtractErr()
+ c.AssertNoErr(err)
c.Logf("Created three users on instance %s: %s, %s, %s", c.instanceID, users[0], users[1], users[2])
c.users = users
}
@@ -46,7 +47,7 @@
func (c context) listUsers() {
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)
@@ -57,13 +58,13 @@
return true, nil
})
- c.CheckNoErr(err)
+ c.AssertNoErr(err)
}
func (c context) deleteUsers() {
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)
}
}