Documentation ¶
Index ¶
- Variables
- func AddLogEntry(init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), ...)
- func AddTarget(...)
- func AuthorizationService(...)
- func BenchmarkIndexWalk(b *testing.B, store kv.SchemaStore, resourceCount, fetchCount int)
- func BucketService(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func CleanupDBRPMappingsV2(ctx context.Context, s influxdb.DBRPMappingService) error
- func CompareAndSetPassword(init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), ...)
- func ComparePassword(init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), ...)
- func CreateAuthorization(...)
- func CreateBucket(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func CreateDBRPMappingV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func CreateLabel(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func CreateLabelMapping(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func CreateOrganization(...)
- func CreateSession(init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), ...)
- func CreateSource(init func(SourceFields, *testing.T) (platform.SourceService, string, func()), ...)
- func CreateUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func CreateUserResourceMapping(...)
- func CreateVariable(...)
- func DBRPMappingService(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func DeleteAuthorization(...)
- func DeleteBucket(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func DeleteDBRPMappingV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func DeleteLabel(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func DeleteLabelMapping(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func DeleteOrganization(...)
- func DeleteSecrets(...)
- func DeleteSource(init func(SourceFields, *testing.T) (platform.SourceService, string, func()), ...)
- func DeleteUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func DeleteUserResourceMapping(...)
- func DeleteVariable(...)
- func ErrorsEqual(t *testing.T, actual, expected error)
- func ExpireSession(init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), ...)
- func FindAuthorizationByID(...)
- func FindAuthorizationByToken(...)
- func FindAuthorizations(...)
- func FindBucket(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func FindBucketByID(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func FindBuckets(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func FindDBRPMappingByIDV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func FindLabelByID(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func FindLabels(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func FindManyDBRPMappingsV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func FindOrganization(...)
- func FindOrganizationByID(...)
- func FindOrganizations(...)
- func FindSession(init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), ...)
- func FindSourceByID(init func(SourceFields, *testing.T) (platform.SourceService, string, func()), ...)
- func FindSources(init func(SourceFields, *testing.T) (platform.SourceService, string, func()), ...)
- func FindUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func FindUserByID(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func FindUserResourceMappings(...)
- func FindUsers(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func FindVariableByID(...)
- func FindVariables(...)
- func FirstLogEntry(init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), ...)
- func ForEachLogEntry(init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), ...)
- func FormatFluxString(t *testing.T, script string) string
- func GetSecretKeys(...)
- func GetTargetByID(...)
- func IDPtr(id platform.ID) *platform.ID
- func KVConcurrentUpdate(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVCursor(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVCursorWithHints(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVDelete(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVForwardCursor(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVGet(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVGetBatch(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVPut(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVStore(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVUpdate(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KVView(init func(KVStoreFields, *testing.T) (kv.Store, func()), t *testing.T)
- func KeyValueLog(init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), ...)
- func LabelService(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func LastLogEntry(init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), ...)
- func ListTargets(...)
- func LoadSecret(...)
- func Migrator(t *testing.T, store kv.SchemaStore, ...)
- func MiscDBRPMappingV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func MustCreateOrgs(ctx context.Context, svc influxdb.OrganizationService, ...)
- func MustCreateUsers(ctx context.Context, svc influxdb.UserService, us ...*influxdb.User)
- func MustIDBase16(s string) platform.ID
- func MustIDBase16Ptr(s string) *platform.ID
- func MustNewPermission(a influxdb.Action, rt influxdb.ResourceType, orgID platform.ID) *influxdb.Permission
- func MustNewPermissionAtID(id platform.ID, a influxdb.Action, rt influxdb.ResourceType, orgID platform.ID) *influxdb.Permission
- func NewTestBoltStore(t *testing.T) (kv.SchemaStore, func())
- func NewTestInmemStore(t *testing.T) kv.SchemaStore
- func OnboardInitialUser(init func(OnboardingFields, *testing.T) (platform.OnboardingService, func()), ...)
- func OrganizationService(...)
- func PasswordsService(init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), ...)
- func PatchSecrets(...)
- func PutSecret(...)
- func PutSecrets(...)
- func RemoveTarget(...)
- func RenewSession(init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), ...)
- func ReplaceVariable(...)
- func ScraperService(...)
- func SecretService(init func(SecretServiceFields, *testing.T) (platform.SecretService, func()), ...)
- func SessionService(init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), ...)
- func SetPassword(init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), ...)
- func TestIndex(t *testing.T, store kv.SchemaStore)
- func TrimWhitespace(...)
- func UpdateAuthorization(...)
- func UpdateBucket(init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), ...)
- func UpdateDBRPMappingV2(init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), ...)
- func UpdateLabel(init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), ...)
- func UpdateOrganization(...)
- func UpdateTarget(...)
- func UpdateUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func UpdateUser_IndexHygiene(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func UpdateVariable(...)
- func UserResourceMappingService(...)
- func UserService(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), ...)
- func VariableService(...)
- type AuthTestOpts
- type AuthorizationFields
- type BucketFields
- type DBRPMappingFields
- type KVStoreFields
- type KeyValueLogFields
- type LabelFields
- type LogEntry
- type NowFunc
- type OnboardingFields
- type OrganizationFields
- type PasswordFields
- type Secret
- type SecretServiceFields
- type SessionFields
- type SourceFields
- type TargetFields
- type UserFields
- type UserResourceFields
- type VariableFields
- type VariableSvcOpts
Constants ¶
This section is empty.
Variables ¶
var DBRPMappingCmpOptions = cmp.Options{ cmp.Comparer(func(x, y []byte) bool { return bytes.Equal(x, y) }), cmp.Transformer("Sort", func(in []*influxdb.DBRPMapping) []*influxdb.DBRPMapping { out := make([]*influxdb.DBRPMapping, len(in)) copy(out, in) sort.Slice(out, func(i, j int) bool { return out[i].ID < out[j].ID }) return out }), }
Functions ¶
func AddLogEntry ¶
func AddLogEntry( init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), t *testing.T, )
AddLogEntry tests the AddLogEntry for the KeyValueLog contract
func AddTarget ¶
func AddTarget( init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T, )
AddTarget testing.
func AuthorizationService ¶
func AuthorizationService( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, opts ...AuthTestOpts)
AuthorizationService tests all the service functions.
func BenchmarkIndexWalk ¶
func BenchmarkIndexWalk(b *testing.B, store kv.SchemaStore, resourceCount, fetchCount int)
func BucketService ¶
func BucketService( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T)
BucketService tests all the service functions.
func CleanupDBRPMappingsV2 ¶
CleanupDBRPMappingsV2 finds and removes all dbrp mappings.
func CompareAndSetPassword ¶
func CompareAndSetPassword( init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), t *testing.T)
CompareAndSetPassword tests implementations of PasswordsService.
func ComparePassword ¶
func ComparePassword( init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), t *testing.T)
ComparePassword tests setting and comparing passwords.
func CreateAuthorization ¶
func CreateAuthorization( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
CreateAuthorization testing
func CreateBucket ¶
func CreateBucket( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
CreateBucket testing
func CreateDBRPMappingV2 ¶
func CreateDBRPMappingV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func CreateLabel ¶
func CreateLabelMapping ¶
func CreateOrganization ¶
func CreateOrganization(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
CreateOrganization testing
func CreateSession ¶
func CreateSession( init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), t *testing.T, )
CreateSession testing
func CreateSource ¶
func CreateSource( init func(SourceFields, *testing.T) (platform.SourceService, string, func()), t *testing.T, )
CreateSource testing
func CreateUser ¶
func CreateUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
CreateUser testing
func CreateUserResourceMapping ¶
func CreateUserResourceMapping( init func(UserResourceFields, *testing.T) (platform.UserResourceMappingService, func()), t *testing.T, )
func CreateVariable ¶
func CreateVariable(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
CreateVariable tests influxdb.VariableService CreateVariable interface method
func DBRPMappingService ¶ added in v2.1.0
func DBRPMappingService( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
DBRPMappingService tests all the service functions.
func DeleteAuthorization ¶
func DeleteAuthorization( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
DeleteAuthorization testing
func DeleteBucket ¶
func DeleteBucket( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
DeleteBucket testing
func DeleteDBRPMappingV2 ¶
func DeleteDBRPMappingV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func DeleteLabel ¶
func DeleteLabelMapping ¶
func DeleteOrganization ¶
func DeleteOrganization(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
DeleteOrganization testing
func DeleteSecrets ¶
func DeleteSecrets( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
DeleteSecrets tests the DeleteSecrets method for the SecretService interface.
func DeleteSource ¶
func DeleteSource( init func(SourceFields, *testing.T) (platform.SourceService, string, func()), t *testing.T, )
DeleteSource testing
func DeleteUser ¶
func DeleteUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
DeleteUser testing
func DeleteUserResourceMapping ¶
func DeleteUserResourceMapping( init func(UserResourceFields, *testing.T) (platform.UserResourceMappingService, func()), t *testing.T, )
func DeleteVariable ¶
func DeleteVariable(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
DeleteVariable tests influxdb.VariableService DeleteVariable interface method
func ErrorsEqual ¶
ErrorsEqual checks to see if the provided errors are equivalent.
func ExpireSession ¶
func ExpireSession( init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), t *testing.T, )
ExpireSession testing
func FindAuthorizationByID ¶
func FindAuthorizationByID( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
FindAuthorizationByID testing
func FindAuthorizationByToken ¶
func FindAuthorizationByToken( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
FindAuthorizationByToken testing
func FindAuthorizations ¶
func FindAuthorizations( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
FindAuthorizations testing
func FindBucket ¶
func FindBucket( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
FindBucket testing
func FindBucketByID ¶
func FindBucketByID( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
FindBucketByID testing
func FindBuckets ¶
func FindBuckets( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
FindBuckets testing
func FindDBRPMappingByIDV2 ¶
func FindDBRPMappingByIDV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func FindLabelByID ¶
func FindLabels ¶
func FindManyDBRPMappingsV2 ¶
func FindManyDBRPMappingsV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func FindOrganization ¶
func FindOrganization(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
FindOrganization testing
func FindOrganizationByID ¶
func FindOrganizationByID(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
FindOrganizationByID testing
func FindOrganizations ¶
func FindOrganizations(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
FindOrganizations testing
func FindSession ¶
func FindSession( init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), t *testing.T, )
FindSession testing
func FindSourceByID ¶
func FindSourceByID( init func(SourceFields, *testing.T) (platform.SourceService, string, func()), t *testing.T, )
FindSourceByID testing
func FindSources ¶
func FindSources( init func(SourceFields, *testing.T) (platform.SourceService, string, func()), t *testing.T, )
FindSources testing
func FindUser ¶
func FindUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
FindUser testing
func FindUserByID ¶
func FindUserByID(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
FindUserByID testing
func FindUserResourceMappings ¶
func FindUserResourceMappings( init func(UserResourceFields, *testing.T) (platform.UserResourceMappingService, func()), t *testing.T, )
func FindUsers ¶
func FindUsers(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
FindUsers testing
func FindVariableByID ¶
func FindVariableByID(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
FindVariableByID tests influxdb.VariableService FindVariableByID interface method
func FindVariables ¶
func FindVariables(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
FindVariables tests influxdb.variableService FindVariables interface method
func FirstLogEntry ¶
func FirstLogEntry( init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), t *testing.T, )
FirstLogEntry tests the FirstLogEntry method for the KeyValueLog contract.
func ForEachLogEntry ¶
func ForEachLogEntry( init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), t *testing.T, )
ForEachLogEntry tests the AddLogEntry for the KeyValueLog contract
func GetSecretKeys ¶
func GetSecretKeys( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
GetSecretKeys tests the GetSecretKeys method for the SecretService interface.
func GetTargetByID ¶
func GetTargetByID( init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T, )
GetTargetByID testing
func KVConcurrentUpdate ¶
KVConcurrentUpdate tests concurrent calls to update.
func KVCursorWithHints ¶
KVCursor tests the cursor contract for the key value store.
func KVForwardCursor ¶
KVForwardCursor tests the forward cursor contract for the key value store.
func KVGetBatch ¶
KVGetBatch tests the get batch method contract for the key value store.
func KeyValueLog ¶
func KeyValueLog( init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), t *testing.T, )
KeyValueLog tests all the service functions.
func LabelService ¶
func LabelService( init func(LabelFields, *testing.T) (influxdb.LabelService, string, func()), t *testing.T, )
LabelService tests all the service functions.
func LastLogEntry ¶
func LastLogEntry( init func(KeyValueLogFields, *testing.T) (platform.KeyValueLog, func()), t *testing.T, )
LastLogEntry tests the LastLogEntry method for the KeyValueLog contract.
func ListTargets ¶
func ListTargets( init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T, )
ListTargets testing
func LoadSecret ¶
func LoadSecret( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
LoadSecret tests the LoadSecret method for the SecretService interface.
func Migrator ¶
func Migrator(t *testing.T, store kv.SchemaStore, newMigrator func(*testing.T, *zap.Logger, kv.SchemaStore, NowFunc) *migration.Migrator)
Migrator tests a migrator against a provided store. The migrator is constructed via a provided constructor function which takes a logger and a now function used to derive time.
func MiscDBRPMappingV2 ¶
func MiscDBRPMappingV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func MustCreateOrgs ¶
func MustCreateUsers ¶
func MustIDBase16 ¶
MustIDBase16 is an helper to ensure a correct ID is built during testing.
func MustIDBase16Ptr ¶
MustIDBase16Ptr is an helper to ensure a correct ID ptr ref is built during testing.
func MustNewPermission ¶ added in v2.2.0
func MustNewPermissionAtID ¶
func NewTestBoltStore ¶ added in v2.1.0
func NewTestBoltStore(t *testing.T) (kv.SchemaStore, func())
func NewTestInmemStore ¶ added in v2.1.0
func NewTestInmemStore(t *testing.T) kv.SchemaStore
func OnboardInitialUser ¶
func OnboardInitialUser( init func(OnboardingFields, *testing.T) (platform.OnboardingService, func()), t *testing.T, )
OnboardInitialUser testing
func OrganizationService ¶
func OrganizationService(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
OrganizationService tests all the service functions.
func PasswordsService ¶
func PasswordsService( init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), t *testing.T, )
PasswordsService tests all the service functions.
func PatchSecrets ¶
func PatchSecrets( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
PatchSecrets tests the PatchSecrets method for the SecretService interface.
func PutSecret ¶
func PutSecret( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
PutSecret tests the PutSecret method for the SecretService interface.
func PutSecrets ¶
func PutSecrets( init func(f SecretServiceFields, t *testing.T) (platform.SecretService, func()), t *testing.T, )
PutSecrets tests the PutSecrets method for the SecretService interface.
func RemoveTarget ¶
func RemoveTarget(init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T)
RemoveTarget testing
func RenewSession ¶
func RenewSession( init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), t *testing.T, )
RenewSession testing
func ReplaceVariable ¶
func ReplaceVariable(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
ReplaceVariable tests influxdb.VariableService ReplaceVariable interface method
func ScraperService ¶
func ScraperService( init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T, )
ScraperService tests all the service functions.
func SecretService ¶
func SecretService( init func(SecretServiceFields, *testing.T) (platform.SecretService, func()), t *testing.T, )
SecretService will test all methods for the secrets service.
func SessionService ¶
func SessionService( init func(SessionFields, *testing.T) (influxdb.SessionService, string, func()), t *testing.T, )
SessionService tests all the service functions.
func SetPassword ¶
func SetPassword( init func(PasswordFields, *testing.T) (influxdb.PasswordsService, func()), t *testing.T)
SetPassword tests overriding the password of a known user
func TrimWhitespace ¶
func UpdateAuthorization ¶
func UpdateAuthorization( init func(AuthorizationFields, *testing.T) (influxdb.AuthorizationService, string, func()), t *testing.T, )
UpdateAuthorization testing
func UpdateBucket ¶
func UpdateBucket( init func(BucketFields, *testing.T) (influxdb.BucketService, string, func()), t *testing.T, )
UpdateBucket testing
func UpdateDBRPMappingV2 ¶
func UpdateDBRPMappingV2( init func(DBRPMappingFields, *testing.T) (influxdb.DBRPMappingService, func()), t *testing.T, )
func UpdateLabel ¶
func UpdateOrganization ¶
func UpdateOrganization(init func(OrganizationFields, *testing.T) (influxdb.OrganizationService, string, func()), isInMem bool, t *testing.T)
UpdateOrganization testing
func UpdateTarget ¶
func UpdateTarget( init func(TargetFields, *testing.T) (influxdb.ScraperTargetStoreService, string, func()), t *testing.T, )
UpdateTarget testing
func UpdateUser ¶
func UpdateUser(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
UpdateUser testing
func UpdateUser_IndexHygiene ¶
func UpdateVariable ¶
func UpdateVariable(init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T)
UpdateVariable tests influxdb.VariableService UpdateVariable interface method
func UserResourceMappingService ¶
func UserResourceMappingService( init func(UserResourceFields, *testing.T) (platform.UserResourceMappingService, func()), t *testing.T, )
UserResourceMappingService tests all the service functions.
func UserService ¶
func UserService(init func(UserFields, *testing.T) (influxdb.UserService, string, func()), isInMem bool, t *testing.T)
UserService tests all the service functions.
func VariableService ¶
func VariableService( init func(VariableFields, *testing.T) (influxdb.VariableService, string, func()), t *testing.T, opts ...VariableSvcOpts, )
VariableService tests all the service functions.
Types ¶
type AuthTestOpts ¶
type AuthTestOpts struct {
WithoutFindByToken bool
}
func WithoutFindByToken ¶
func WithoutFindByToken() AuthTestOpts
WithoutFindByToken allows the Find By Token test case to be skipped when we are testing the http server, since finding by token is not supported by the HTTP API
type AuthorizationFields ¶
type AuthorizationFields struct { IDGenerator platform.IDGenerator OrgIDGenerator platform.IDGenerator TokenGenerator influxdb.TokenGenerator TimeGenerator influxdb.TimeGenerator Authorizations []*influxdb.Authorization Users []*influxdb.User Orgs []*influxdb.Organization }
AuthorizationFields will include the IDGenerator, and authorizations
type BucketFields ¶
type BucketFields struct { IDGenerator platform.IDGenerator OrgIDs platform.IDGenerator BucketIDs platform.IDGenerator TimeGenerator influxdb.TimeGenerator Buckets []*influxdb.Bucket Organizations []*influxdb.Organization }
BucketFields will include the IDGenerator, and buckets
type DBRPMappingFields ¶
type DBRPMappingFields struct { BucketSvc influxdb.BucketService DBRPMappingsV2 []*influxdb.DBRPMapping }
type KVStoreFields ¶
KVStoreFields are background data that has to be set before the test runs.
type KeyValueLogFields ¶
type KeyValueLogFields struct {
LogEntries []LogEntry
}
KeyValueLogFields will include the IDGenerator, and keyValueLogs
type LabelFields ¶
type LabelFields struct { Labels []*influxdb.Label Mappings []*influxdb.LabelMapping IDGenerator platform.IDGenerator }
LabelFields include the IDGenerator, labels and their mappings
type OnboardingFields ¶
type OnboardingFields struct { IDGenerator platform2.IDGenerator TokenGenerator platform.TokenGenerator TimeGenerator platform.TimeGenerator IsOnboarding bool }
OnboardingFields will include the IDGenerator, TokenGenerator and IsOnboarding
type OrganizationFields ¶
type OrganizationFields struct { IDGenerator platform.IDGenerator OrgBucketIDs platform.IDGenerator Organizations []*influxdb.Organization TimeGenerator influxdb.TimeGenerator }
OrganizationFields will include the IDGenerator, and organizations
type PasswordFields ¶
type PasswordFields struct { IDGenerator platform.IDGenerator Users []*influxdb.User Passwords []string // passwords are indexed against the Users field }
PasswordFields will include the IDGenerator, and users and their passwords.
type SecretServiceFields ¶
type SecretServiceFields struct {
Secrets []Secret
}
SecretServiceFields contain the
type SessionFields ¶
type SessionFields struct { IDGenerator platform.IDGenerator TokenGenerator influxdb.TokenGenerator Sessions []*influxdb.Session Users []*influxdb.User }
SessionFields will include the IDGenerator, TokenGenerator, Sessions, and Users
type SourceFields ¶
type SourceFields struct { IDGenerator platform2.IDGenerator Sources []*platform.Source }
SourceFields will include the IDGenerator, and sources
type TargetFields ¶
type TargetFields struct { IDGenerator platform.IDGenerator Targets []*influxdb.ScraperTarget Organizations []*influxdb.Organization }
TargetFields will include the IDGenerator, and targets
type UserFields ¶
type UserFields struct { IDGenerator platform.IDGenerator Users []*influxdb.User }
UserFields will include the IDGenerator, and users
type UserResourceFields ¶
type UserResourceFields struct { Organizations []*platform.Organization Users []*platform.User Buckets []*platform.Bucket UserResourceMappings []*platform.UserResourceMapping }
UserResourceFields includes prepopulated data for mapping tests
type VariableFields ¶
type VariableFields struct { Variables []*influxdb.Variable IDGenerator platform.IDGenerator TimeGenerator influxdb.TimeGenerator }
VariableFields defines fields for a variable test
type VariableSvcOpts ¶
type VariableSvcOpts struct {
HTTPValidation bool
}
func WithHTTPValidation ¶
func WithHTTPValidation() VariableSvcOpts