helper

package
v1.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerPort   string
	ServerHost   string
	ServerScheme string
	DebugHTTP    bool
)

Configuration flags provided by the user that runs an acceptance test.

Credentials for the root key

Functions

func AddReference added in v1.16.0

func AddReference(t *testing.T, object *models.Object, ref *models.SingleRef, prop string)

func AddReferences added in v1.17.0

func AddReferences(t *testing.T, refs []*models.BatchReference)

func AssertCreateObject added in v1.15.0

func AssertCreateObject(t *testing.T, className string, schema map[string]interface{}) strfmt.UUID

func AssertCreateObjectClass added in v1.15.0

func AssertCreateObjectClass(t *testing.T, class *models.Class)

func AssertDeleteObjectClass added in v1.15.0

func AssertDeleteObjectClass(t *testing.T, class string)

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 AssertEventuallyEqualWithFrequencyAndTimeout

func AssertEventuallyEqualWithFrequencyAndTimeout(t *testing.T, expected interface{}, actualThunk func() interface{},
	interval time.Duration, timeout time.Duration, msg ...interface{},
)

func AssertGetObject added in v1.15.0

func AssertGetObject(t *testing.T, class string, uuid strfmt.UUID, include ...string) *models.Object

func AssertGetObjectEventually added in v1.15.0

func AssertGetObjectEventually(t *testing.T, class string, uuid strfmt.UUID) *models.Object

func AssertGetObjectFailsEventually added in v1.15.0

func AssertGetObjectFailsEventually(t *testing.T, class string, uuid strfmt.UUID) error

func AssertRequestFail added in v1.15.0

func AssertRequestFail(t *testing.T, response interface{}, err error, check_fn func())

Asserts that the request _did_ return an error. Optionally perform some checks only if the request failed

func AssertRequestOk added in v1.15.0

func AssertRequestOk(t *testing.T, response interface{}, err error, check_fn func())

Asserts that the request did not return an error. Optionally perform some checks only if the request did not fail

func BatchClient added in v1.15.0

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 CertaintyToDist added in v1.14.0

func CertaintyToDist(t *testing.T, in float32) float32

func Client added in v1.15.0

func Client(t *testing.T) *apiclient.Weaviate

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 CreateAuth added in v1.15.0

func CreateAuth(apiKey strfmt.UUID, apiToken string) runtime.ClientAuthInfoWriterFunc

Create a Weaviate client for the given API key & token.

func CreateBackup added in v1.15.0

func CreateBackup(t *testing.T, className, backend, backupID string) (*backups.BackupsCreateOK, error)

func CreateBackupStatus added in v1.15.0

func CreateBackupStatus(t *testing.T, backend, backupID string) (*backups.BackupsCreateStatusOK, error)

func CreateClass added in v1.15.0

func CreateClass(t *testing.T, class *models.Class)

func CreateObject added in v1.15.0

func CreateObject(t *testing.T, object *models.Object)

func CreateObjectsBatch added in v1.15.0

func CreateObjectsBatch(t *testing.T, objects []*models.Object)

func DeleteClass added in v1.15.0

func DeleteClass(t *testing.T, class string)

func DeleteClassObject added in v1.15.0

func DeleteClassObject(t *testing.T, class string) (*schema.SchemaObjectsDeleteOK, error)

func DeleteObject added in v1.16.0

func DeleteObject(t *testing.T, object *models.Object)

func DeleteObjectsBatch added in v1.17.0

func DeleteObjectsBatch(t *testing.T, body *models.BatchDelete)

func DeleteReference added in v1.16.0

func DeleteReference(t *testing.T, object *models.Object, ref *models.SingleRef, prop string)

func GetClass added in v1.17.0

func GetClass(t *testing.T, class string) *models.Class

func GetObject added in v1.15.0

func GetObject(t *testing.T, class string, uuid strfmt.UUID, include ...string) (*models.Object, error)

func GetObjectFromNode added in v1.17.0

func GetObjectFromNode(t *testing.T, class string, uuid strfmt.UUID, nodename string) (*models.Object, error)

func GetRandomString added in v1.15.0

func GetRandomString(length int) string

GetRandomString returns a string comprised of random samplings of charset, of length specified by caller

func GetWeaviateURL added in v1.15.0

func GetWeaviateURL() string

func OperationsClient added in v1.15.0

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 PatchObject added in v1.17.0

func PatchObject(t *testing.T, object *models.Object)

func RestoreBackup added in v1.15.0

func RestoreBackup(t *testing.T, className, backend, backupID string) (*backups.BackupsRestoreOK, error)

func RestoreBackupStatus added in v1.15.0

func RestoreBackupStatus(t *testing.T, backend, backupID string) (*backups.BackupsRestoreStatusOK, error)

func SetupClient added in v1.15.0

func SetupClient(uri string)

func UpdateClass added in v1.17.0

func UpdateClass(t *testing.T, class *models.Class)

func UpdateObject added in v1.16.0

func UpdateObject(t *testing.T, object *models.Object)

Types

This section is empty.

Directories

Path Synopsis
sample-schema

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL