Documentation ¶
Overview ¶
Package v2 contains common functions for creating db resources for use in acceptance tests. See the `*_test.go` files for example usages.
Index ¶
- func CreateDatabase(t *testing.T, client *gophercloud.ServiceClient, instanceID string) error
- func CreateInstance(t *testing.T, client *gophercloud.ServiceClient) (*instances.Instance, error)
- func CreateUser(t *testing.T, client *gophercloud.ServiceClient, instanceID string) error
- func DeleteDatabase(t *testing.T, client *gophercloud.ServiceClient, instanceID, name string)
- func DeleteInstance(t *testing.T, client *gophercloud.ServiceClient, id string)
- func DeleteUser(t *testing.T, client *gophercloud.ServiceClient, instanceID, name string)
- func WaitForInstanceStatus(client *gophercloud.ServiceClient, instance *instances.Instance, status string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabase ¶
CreateDatabase will create a database with a randomly generated name. An error will be returned if the database was unable to be created.
func CreateInstance ¶
CreateInstance will create an instance with a randomly generated name. The flavor of the instance will be the value of the OS_FLAVOR_ID environment variable. The Datastore will be pulled from the OS_DATASTORE_TYPE_ID environment variable. An error will be returned if the instance was unable to be created.
func CreateUser ¶
CreateUser will create a user with a randomly generated name. An error will be returned if the user was unable to be created.
func DeleteDatabase ¶
DeleteDatabase deletes a database. A fatal error will occur if the database failed to delete. This works best when used as a deferred function.
func DeleteInstance ¶
DeleteInstance deletes an instance. A fatal error will occur if the instance failed to delete. This works best when used as a deferred function.
func DeleteUser ¶
DeleteUser deletes a user. A fatal error will occur if the user failed to delete. This works best when used as a deferred function.
Types ¶
This section is empty.