Documentation ¶
Index ¶
- type MockProviderClient
- func (c MockProviderClient) CloudAdminClient(factory core.ServiceClientFactory) (*gophercloud.ServiceClient, error)
- func (c MockProviderClient) FindProjectID(projectName, projectDomainName string) (string, error)
- func (c MockProviderClient) GetAuthResult() gophercloud.AuthResult
- func (c MockProviderClient) GetDomain(domainID string) (*core.CachedDomain, error)
- func (c MockProviderClient) GetProject(projectID string) (*core.CachedProject, error)
- func (c MockProviderClient) ProjectScopedClient(scope core.ProjectScope) (*gophercloud.ProviderClient, gophercloud.EndpointOpts, error)
- type T
- func (t T) AssertJSONEqual(variable string, actual, expected any)
- func (t T) ExpectAssets(dbi *gorp.DbMap, assets ...db.Asset)
- func (t T) ExpectFinishedOperations(dbi *gorp.DbMap, ops ...db.FinishedOperation)
- func (t T) ExpectPendingOperations(dbi *gorp.DbMap, ops ...db.PendingOperation)
- func (t T) Must(err error)
- func (t T) MustExec(dbi *gorp.DbMap, query string, args ...any)
- func (t T) MustUpdate(dbi *gorp.DbMap, row any)
- func (t T) WithDB(fixtureFile *string, action func(dbi *gorp.DbMap))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProviderClient ¶
type MockProviderClient struct { Domains map[string]core.CachedDomain Projects map[string]core.CachedProject }
MockProviderClient implements the core.ProviderClientInterface.
func (MockProviderClient) CloudAdminClient ¶
func (c MockProviderClient) CloudAdminClient(factory core.ServiceClientFactory) (*gophercloud.ServiceClient, error)
func (MockProviderClient) FindProjectID ¶
func (c MockProviderClient) FindProjectID(projectName, projectDomainName string) (string, error)
func (MockProviderClient) GetAuthResult ¶
func (c MockProviderClient) GetAuthResult() gophercloud.AuthResult
func (MockProviderClient) GetDomain ¶
func (c MockProviderClient) GetDomain(domainID string) (*core.CachedDomain, error)
func (MockProviderClient) GetProject ¶
func (c MockProviderClient) GetProject(projectID string) (*core.CachedProject, error)
func (MockProviderClient) ProjectScopedClient ¶
func (c MockProviderClient) ProjectScopedClient(scope core.ProjectScope) (*gophercloud.ProviderClient, gophercloud.EndpointOpts, error)
type T ¶
T extends testing.T with custom helper methods.
func (T) AssertJSONEqual ¶
AssertJSONEqual checks that both given values have identical JSON serializations.
func (T) ExpectAssets ¶
ExpectAssets checks that the DB contains exactly the given assets.
func (T) ExpectFinishedOperations ¶
func (t T) ExpectFinishedOperations(dbi *gorp.DbMap, ops ...db.FinishedOperation)
ExpectFinishedOperations checks that the DB contains exactly the given finished ops.
func (T) ExpectPendingOperations ¶
func (t T) ExpectPendingOperations(dbi *gorp.DbMap, ops ...db.PendingOperation)
ExpectPendingOperations checks that the DB contains exactly the given pending ops.
func (T) MustUpdate ¶
MustUpdate aborts the test if dbi.Update(row) throws an error.
Click to show internal directories.
Click to hide internal directories.