Documentation
¶
Index ¶
- Variables
- func AddPermissions(t *testing.T, key, role string, permissions ...*models.Permission)
- func AddReference(t *testing.T, object *models.Object, ref *models.SingleRef, prop string)
- func AddReferenceTenant(t *testing.T, object *models.Object, ref *models.SingleRef, prop string, ...)
- func AddReferences(t *testing.T, refs []*models.BatchReference) ([]*models.BatchReferenceResponse, error)
- func AssertCreateObject(t *testing.T, className string, schema map[string]interface{}) strfmt.UUID
- func AssertCreateObjectClass(t *testing.T, class *models.Class)
- func AssertDeleteObjectClass(t *testing.T, class string)
- func AssertEventuallyEqual(t *testing.T, expected interface{}, actualThunk func() interface{}, ...)
- func AssertEventuallyEqualWithFrequencyAndTimeout(t *testing.T, expected interface{}, actualThunk func() interface{}, ...)
- func AssertGetObject(t *testing.T, class string, uuid strfmt.UUID, include ...string) *models.Object
- func AssertGetObjectEventually(t *testing.T, class string, uuid strfmt.UUID) *models.Object
- func AssertGetObjectFailsEventually(t *testing.T, class string, uuid strfmt.UUID) error
- func AssertRequestFail(t *testing.T, response interface{}, err error, checkFn func())
- func AssertRequestOk(t *testing.T, response interface{}, err error, checkFn func())
- func AssignRoleToUser(t *testing.T, key, role, user string)
- func BatchClient(t *testing.T) batch.ClientService
- func CancelBackup(t *testing.T, backend, backupID string) error
- func CancelBackupWithAuthz(t *testing.T, backend, backupID string, authInfo runtime.ClientAuthInfoWriter) error
- func CertaintyToDist(t *testing.T, in float32) float32
- func CheckObjectsBatchResponse(t *testing.T, resp []*models.ObjectsGetResponse, err error)
- func CheckReferencesBatchResponse(t *testing.T, resp []*models.BatchReferenceResponse, err error)
- func Client(t *testing.T) *apiclient.Weaviate
- func ClientGRPC(t *testing.T) pb.WeaviateClient
- func CreateAuth(apiKey string) runtime.ClientAuthInfoWriterFunc
- func CreateBackup(t *testing.T, cfg *models.BackupConfig, className, backend, backupID string) (*backups.BackupsCreateOK, error)
- func CreateBackupStatus(t *testing.T, backend, backupID, overrideBucket, overridePath string) (*backups.BackupsCreateStatusOK, error)
- func CreateBackupStatusWithAuthz(t *testing.T, backend, backupID, overrideBucket, overridePath string, ...) (*backups.BackupsCreateStatusOK, error)
- func CreateBackupWithAuthz(t *testing.T, cfg *models.BackupConfig, className, backend, backupID string, ...) (*backups.BackupsCreateOK, error)
- func CreateClass(t *testing.T, class *models.Class)
- func CreateClassAuth(t *testing.T, class *models.Class, key string)
- func CreateGrpcConnectionClient(host string) (*grpc.ClientConn, error)
- func CreateGrpcWeaviateClient(conn *grpc.ClientConn) pb.WeaviateClient
- func CreateObject(t *testing.T, object *models.Object) error
- func CreateObjectCL(t *testing.T, object *models.Object, cl replica.ConsistencyLevel) error
- func CreateObjectWithResponse(t *testing.T, object *models.Object) (*models.Object, error)
- func CreateObjectsBatch(t *testing.T, objects []*models.Object)
- func CreateObjectsBatchAuth(t *testing.T, objects []*models.Object, key string)
- func CreateObjectsBatchCL(t *testing.T, objects []*models.Object, cl replica.ConsistencyLevel)
- func CreateRole(t *testing.T, key string, role *models.Role)
- func CreateTenants(t *testing.T, class string, tenants []*models.Tenant)
- func CreateTenantsAuth(t *testing.T, class string, tenants []*models.Tenant, key string)
- func CreateTenantsReturnError(t *testing.T, class string, tenants []*models.Tenant) error
- func DefaultBackupConfig() *models.BackupConfig
- func DefaultRestoreConfig() *models.RestoreConfig
- func DeleteClass(t *testing.T, class string)
- func DeleteClassObject(t *testing.T, class string) (*schema.SchemaObjectsDeleteOK, error)
- func DeleteClassWithAuthz(t *testing.T, class string, authInfo runtime.ClientAuthInfoWriter)
- func DeleteObject(t *testing.T, object *models.Object)
- func DeleteObjectCL(t *testing.T, class string, id strfmt.UUID, cl replica.ConsistencyLevel)
- func DeleteObjectsBatch(t *testing.T, body *models.BatchDelete, cl replica.ConsistencyLevel)
- func DeleteReference(t *testing.T, object *models.Object, ref *models.SingleRef, prop string)
- func DeleteReferenceTenant(t *testing.T, object *models.Object, ref *models.SingleRef, prop string, ...)
- func DeleteRole(t *testing.T, key, role string)
- func DeleteTenantObject(t *testing.T, class string, id strfmt.UUID, tenant string, ...)
- func DeleteTenantObjectsBatch(t *testing.T, body *models.BatchDelete, tenant string) (*models.BatchDeleteResponse, error)
- func DeleteTenantObjectsBatchCL(t *testing.T, body *models.BatchDelete, tenant string, ...) (*models.BatchDeleteResponse, error)
- func DeleteTenants(t *testing.T, class string, tenants []string) error
- func EnablePQ(t *testing.T, className string, pq map[string]interface{})
- func GetClass(t *testing.T, class string) *models.Class
- func GetClassWithoutAssert(t *testing.T, class string) (*models.Class, error)
- func GetMeta(t *testing.T) *models.Meta
- func GetObject(t *testing.T, class string, uuid strfmt.UUID, include ...string) (*models.Object, error)
- func GetObjectCL(t *testing.T, class string, uuid strfmt.UUID, cl replica.ConsistencyLevel, ...) (*models.Object, error)
- func GetObjectFromNode(t *testing.T, class string, uuid strfmt.UUID, nodename string) (*models.Object, error)
- func GetOneTenant(t *testing.T, class, tenant string) (*schema.TenantsGetOneOK, error)
- func GetRandomString(length int) string
- func GetRoleByName(t *testing.T, key, role string) *models.Role
- func GetRoles(t *testing.T, key string) []*models.Role
- func GetRolesForOwnUser(t *testing.T, key string) []*models.Role
- func GetRolesForUser(t *testing.T, user, key string) []*models.Role
- func GetTenantObjectFromNode(t *testing.T, class string, uuid strfmt.UUID, nodename, tenant string) (*models.Object, error)
- func GetTenants(t *testing.T, class string) (*schema.TenantsGetOK, error)
- func GetTenantsGRPC(t *testing.T, class string) (*pb.TenantsGetReply, error)
- func GetWeaviateGRPCURL() string
- func GetWeaviateURL() string
- func IntToUUID(in uint64) strfmt.UUID
- func ListBackup(t *testing.T, backend string) (*backups.BackupsListOK, error)
- func ListBackupsWithAuthz(t *testing.T, backend string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsListOK, error)
- func ListObjects(t *testing.T, class string) (*models.ObjectsListResponse, error)
- func NewBeacon(className string, id strfmt.UUID) strfmt.URI
- func ObjectContentsProp(contents string) map[string]interface{}
- func ObjectExistsCL(t *testing.T, class string, id strfmt.UUID, cl replica.ConsistencyLevel) (bool, error)
- func OperationsClient(t *testing.T) operations_apiclient.ClientService
- func PatchObject(t *testing.T, object *models.Object) error
- func ResetClient()
- func RestoreBackup(t *testing.T, cfg *models.RestoreConfig, className, backend, backupID string, ...) (*backups.BackupsRestoreOK, error)
- func RestoreBackupStatus(t *testing.T, backend, backupID, overrideBucket, overridePath string) (*backups.BackupsRestoreStatusOK, error)
- func RestoreBackupStatusWithAuthz(t *testing.T, backend, backupID, overrideBucket, overridePath string, ...) (*backups.BackupsRestoreStatusOK, error)
- func RestoreBackupWithAuthz(t *testing.T, cfg *models.RestoreConfig, className, backend, backupID string, ...) (*backups.BackupsRestoreOK, error)
- func SetupClient(uri string)
- func SetupGRPCClient(t *testing.T, uri string)
- func TenantExists(t *testing.T, class string, tenant string) (*schema.TenantExistsOK, error)
- func TenantListObjects(t *testing.T, class string, tenant string) (*models.ObjectsListResponse, error)
- func TenantObject(t *testing.T, class string, id strfmt.UUID, tenant string) (*models.Object, error)
- func TenantObjectExists(t *testing.T, class string, id strfmt.UUID, tenant string) (bool, error)
- func TenantObjectWithInclude(t *testing.T, class string, id strfmt.UUID, tenant string, includes string) (*models.Object, error)
- func UpdateClass(t *testing.T, class *models.Class)
- func UpdateObject(t *testing.T, object *models.Object) error
- func UpdateObjectCL(t *testing.T, object *models.Object, cl replica.ConsistencyLevel) error
- func UpdateReferenceTenant(t *testing.T, object *models.Object, ref models.MultipleRef, prop string, ...)
- func UpdateTenants(t *testing.T, class string, tenants []*models.Tenant)
- func UpdateTenantsReturnError(t *testing.T, class string, tenants []*models.Tenant) error
- type BackupPermission
- type DataPermission
- func (p *DataPermission) Permission() *models.Permission
- func (p *DataPermission) WithAction(action string) *DataPermission
- func (p *DataPermission) WithCollection(collection string) *DataPermission
- func (p *DataPermission) WithObject(object string) *DataPermission
- func (p *DataPermission) WithTenant(tenant string) *DataPermission
- type NodesPermission
- type SchemaPermission
Constants ¶
This section is empty.
Variables ¶
var ( ServerPort string ServerHost string ServerGRPCPort string ServerGRPCHost string ServerScheme string DebugHTTP bool )
Configuration flags provided by the user that runs an acceptance test.
var RootAuth runtime.ClientAuthInfoWriterFunc
Credentials for the root key
Functions ¶
func AddPermissions ¶ added in v1.28.0
func AddPermissions(t *testing.T, key, role string, permissions ...*models.Permission)
func AddReference ¶
func AddReferenceTenant ¶ added in v1.20.0
func AddReferences ¶
func AddReferences(t *testing.T, refs []*models.BatchReference) ([]*models.BatchReferenceResponse, error)
func AssertCreateObject ¶
func AssertDeleteObjectClass ¶
func AssertEventuallyEqual ¶
func AssertEventuallyEqual(t *testing.T, expected interface{}, actualThunk func() interface{}, msg ...interface{})
AssertEventuallyEqual retries the 'actual' thunk every 10ms for a total of 300ms. If a single one succeeds, it returns, if all fails it eventually fails
func AssertGetObject ¶
func AssertRequestFail ¶
Asserts that the request _did_ return an error. Optionally perform some checks only if the request failed
func AssertRequestOk ¶
Asserts that the request did not return an error. Optionally perform some checks only if the request did not fail
func AssignRoleToUser ¶ added in v1.28.0
func BatchClient ¶
func BatchClient(t *testing.T) batch.ClientService
Create a client that logs with t.Logf, if a *testing.T is provided. If there is no test case at hand, pass in nil to disable logging.
func CancelBackup ¶ added in v1.24.25
func CancelBackupWithAuthz ¶ added in v1.28.0
func CheckObjectsBatchResponse ¶ added in v1.20.0
func CheckObjectsBatchResponse(t *testing.T, resp []*models.ObjectsGetResponse, err error)
func CheckReferencesBatchResponse ¶ added in v1.20.0
func CheckReferencesBatchResponse(t *testing.T, resp []*models.BatchReferenceResponse, err error)
func Client ¶
Create a client that logs with t.Logf, if a *testing.T is provided. If there is no test case at hand, pass in nil to disable logging.
func ClientGRPC ¶ added in v1.26.0
func ClientGRPC(t *testing.T) pb.WeaviateClient
func CreateAuth ¶
func CreateAuth(apiKey string) runtime.ClientAuthInfoWriterFunc
Create a auth writer for the Weaviate client with a specific key
func CreateBackup ¶
func CreateBackup(t *testing.T, cfg *models.BackupConfig, className, backend, backupID string) (*backups.BackupsCreateOK, error)
func CreateBackupStatus ¶
func CreateBackupStatusWithAuthz ¶ added in v1.28.0
func CreateBackupStatusWithAuthz(t *testing.T, backend, backupID, overrideBucket, overridePath string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsCreateStatusOK, error)
func CreateBackupWithAuthz ¶ added in v1.28.0
func CreateBackupWithAuthz(t *testing.T, cfg *models.BackupConfig, className, backend, backupID string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsCreateOK, error)
func CreateClassAuth ¶ added in v1.28.0
func CreateGrpcConnectionClient ¶ added in v1.22.0
func CreateGrpcConnectionClient(host string) (*grpc.ClientConn, error)
func CreateGrpcWeaviateClient ¶ added in v1.22.0
func CreateGrpcWeaviateClient(conn *grpc.ClientConn) pb.WeaviateClient
func CreateObjectCL ¶ added in v1.18.0
func CreateObjectWithResponse ¶ added in v1.25.2
func CreateObjectsBatchAuth ¶ added in v1.28.0
func CreateObjectsBatchCL ¶ added in v1.26.0
func CreateTenants ¶ added in v1.20.0
func CreateTenantsAuth ¶ added in v1.28.0
func CreateTenantsReturnError ¶ added in v1.20.0
func DefaultBackupConfig ¶ added in v1.24.0
func DefaultBackupConfig() *models.BackupConfig
func DefaultRestoreConfig ¶ added in v1.24.0
func DefaultRestoreConfig() *models.RestoreConfig
func DeleteClass ¶
func DeleteClassObject ¶
func DeleteClassWithAuthz ¶ added in v1.28.0
func DeleteClassWithAuthz(t *testing.T, class string, authInfo runtime.ClientAuthInfoWriter)
func DeleteObjectCL ¶ added in v1.24.18
func DeleteObjectsBatch ¶
func DeleteObjectsBatch(t *testing.T, body *models.BatchDelete, cl replica.ConsistencyLevel)
func DeleteReference ¶
func DeleteReferenceTenant ¶ added in v1.20.0
func DeleteRole ¶ added in v1.28.0
func DeleteTenantObject ¶ added in v1.20.0
func DeleteTenantObjectsBatch ¶ added in v1.20.0
func DeleteTenantObjectsBatch(t *testing.T, body *models.BatchDelete, tenant string, ) (*models.BatchDeleteResponse, error)
func DeleteTenantObjectsBatchCL ¶ added in v1.24.18
func DeleteTenantObjectsBatchCL(t *testing.T, body *models.BatchDelete, tenant string, cl replica.ConsistencyLevel, ) (*models.BatchDeleteResponse, error)
func DeleteTenants ¶ added in v1.20.0
func GetClassWithoutAssert ¶ added in v1.25.27
func GetObjectCL ¶ added in v1.18.0
func GetObjectFromNode ¶
func GetOneTenant ¶ added in v1.28.0
func GetRandomString ¶
GetRandomString returns a string comprised of random samplings of charset, of length specified by caller
func GetRoleByName ¶ added in v1.28.0
func GetRolesForOwnUser ¶ added in v1.28.0
func GetRolesForUser ¶ added in v1.28.0
func GetTenantObjectFromNode ¶ added in v1.20.0
func GetTenants ¶ added in v1.20.0
func GetTenantsGRPC ¶ added in v1.26.0
func GetWeaviateGRPCURL ¶ added in v1.27.0
func GetWeaviateGRPCURL() string
func GetWeaviateURL ¶
func GetWeaviateURL() string
func IntToUUID ¶ added in v1.19.8
InToUUID takes an unsigned int64 and places it in BigEndian fashion into the upper 8 bytes of a 16 byte UUID. This makes it easy to produce easy-to-read UUIDs in test scenarios. For example:
IntToUUID(1) // returns "00000000-0000-0000-0000-000000000001"
func ListBackup ¶ added in v1.24.25
func ListBackupsWithAuthz ¶ added in v1.28.0
func ListBackupsWithAuthz(t *testing.T, backend string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsListOK, error)
func ListObjects ¶ added in v1.20.0
func ObjectContentsProp ¶ added in v1.25.13
func ObjectExistsCL ¶ added in v1.18.0
func OperationsClient ¶
func OperationsClient(t *testing.T) operations_apiclient.ClientService
Create a client that logs with t.Logf, if a *testing.T is provided. If there is no test case at hand, pass in nil to disable logging.
func ResetClient ¶ added in v1.25.0
func ResetClient()
func RestoreBackup ¶
func RestoreBackup(t *testing.T, cfg *models.RestoreConfig, className, backend, backupID string, nodeMapping map[string]string) (*backups.BackupsRestoreOK, error)
func RestoreBackupStatus ¶
func RestoreBackupStatusWithAuthz ¶ added in v1.28.0
func RestoreBackupStatusWithAuthz(t *testing.T, backend, backupID, overrideBucket, overridePath string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsRestoreStatusOK, error)
func RestoreBackupWithAuthz ¶ added in v1.28.0
func RestoreBackupWithAuthz(t *testing.T, cfg *models.RestoreConfig, className, backend, backupID string, nodeMapping map[string]string, authInfo runtime.ClientAuthInfoWriter) (*backups.BackupsRestoreOK, error)
func SetupClient ¶
func SetupClient(uri string)
func SetupGRPCClient ¶ added in v1.26.0
func TenantExists ¶ added in v1.25.0
func TenantListObjects ¶ added in v1.20.0
func TenantObject ¶ added in v1.20.0
func TenantObjectExists ¶ added in v1.20.0
func TenantObjectWithInclude ¶ added in v1.21.0
func UpdateObjectCL ¶ added in v1.18.0
func UpdateReferenceTenant ¶ added in v1.20.0
func UpdateTenants ¶ added in v1.26.0
Types ¶
type BackupPermission ¶ added in v1.28.0
type BackupPermission models.Permission
func NewBackupPermission ¶ added in v1.28.0
func NewBackupPermission() *BackupPermission
func (*BackupPermission) Permission ¶ added in v1.28.0
func (p *BackupPermission) Permission() *models.Permission
func (*BackupPermission) WithAction ¶ added in v1.28.0
func (p *BackupPermission) WithAction(action string) *BackupPermission
func (*BackupPermission) WithCollection ¶ added in v1.28.0
func (p *BackupPermission) WithCollection(collection string) *BackupPermission
type DataPermission ¶ added in v1.28.0
type DataPermission models.Permission
func NewDataPermission ¶ added in v1.28.0
func NewDataPermission() *DataPermission
func (*DataPermission) Permission ¶ added in v1.28.0
func (p *DataPermission) Permission() *models.Permission
func (*DataPermission) WithAction ¶ added in v1.28.0
func (p *DataPermission) WithAction(action string) *DataPermission
func (*DataPermission) WithCollection ¶ added in v1.28.0
func (p *DataPermission) WithCollection(collection string) *DataPermission
func (*DataPermission) WithObject ¶ added in v1.28.0
func (p *DataPermission) WithObject(object string) *DataPermission
func (*DataPermission) WithTenant ¶ added in v1.28.0
func (p *DataPermission) WithTenant(tenant string) *DataPermission
type NodesPermission ¶ added in v1.28.0
type NodesPermission models.Permission
func NewNodesPermission ¶ added in v1.28.0
func NewNodesPermission() *NodesPermission
func (*NodesPermission) Permission ¶ added in v1.28.0
func (p *NodesPermission) Permission() *models.Permission
func (*NodesPermission) WithAction ¶ added in v1.28.0
func (p *NodesPermission) WithAction(action string) *NodesPermission
func (*NodesPermission) WithCollection ¶ added in v1.28.0
func (p *NodesPermission) WithCollection(collection string) *NodesPermission
func (*NodesPermission) WithVerbosity ¶ added in v1.28.0
func (p *NodesPermission) WithVerbosity(verbosity string) *NodesPermission
type SchemaPermission ¶
type SchemaPermission models.Permission
func NewSchemaPermission ¶
func NewSchemaPermission() *SchemaPermission
func (*SchemaPermission) Permission ¶
func (p *SchemaPermission) Permission() *models.Permission
func (*SchemaPermission) WithAction ¶
func (p *SchemaPermission) WithAction(action string) *SchemaPermission
func (*SchemaPermission) WithCollection ¶
func (p *SchemaPermission) WithCollection(collection string) *SchemaPermission
func (*SchemaPermission) WithTenant ¶
func (p *SchemaPermission) WithTenant(tenant string) *SchemaPermission