datastore: go.mercari.io/datastore/testsuite Index | Files | Directories

package testsuite

import "go.mercari.io/datastore/testsuite"

Package testsuite has nothing to use in your application. This package is a backend independent test suite to verify the compatibility of this repository.

Index

Package Files

batch.go doc.go entity_ops.go geopoint.go gob.go key.go namespace.go property_ls.go property_translater.go query.go suite.go transaction.go tx_batch.go

Variables

var TestSuite = map[string]Test{
    "Batch_Put":                                   batchPut,
    "Batch_PutWithCustomErrHandler":               batchPutWithCustomErrHandler,
    "Batch_Get":                                   batchGet,
    "Batch_GetWithCustomErrHandler":               batchGetWithCustomErrHandler,
    "Batch_Delete":                                batchDelete,
    "Batch_DeleteWithCustomErrHandler":            batchDeleteWithCustomErrHandler,
    "PutAndGet":                                   putAndGet,
    "PutAndGet_TimeTime":                          putAndGetTimeTime,
    "PutAndDelete":                                putAndDelete,
    "PutAndGet_ObjectHasObjectSlice":              putAndGetObjectHasObjectSlice,
    "PutAndGet_ObjectHasObjectSliceWithFlatten":   putAndGetObjectHasObjectSliceWithFlatten,
    "PutEntityType":                               putEntityType,
    "PutAndGet_NilKey":                            putAndGetNilKey,
    "PutAndGet_NilKeySlice":                       putAndGetNilKeySlice,
    "PutInterface":                                putInterface,
    "PutAndGet_PropertyList":                      putAndGetPropertyList,
    "PutAndGet_MultiPropertyListSlice":            putAndGetMultiPropertyListSlice,
    "PutAndGet_BareStruct":                        putAndGetBareStruct,
    "PutAndGet_MultiBareStruct":                   putAndGetMultiBareStruct,
    "GeoPoint_PutAndGet":                          geoPointPutAndGet,
    "GobDecode":                                   gobDecode,
    "Key_Equal":                                   keyEqual,
    "Key_Incomplete":                              keyIncomplete,
    "Key_PutAndGet":                               keyPutAndGet,
    "Namespace_PutAndGet":                         namespacePutAndGet,
    "Namespace_PutAndGetWithTx":                   namespacePutAndGetWithTx,
    "Namespace_Query":                             namespaceQuery,
    "PLS_Basic":                                   plsBasic,
    "KL_Basic":                                    klBasic,
    "PropertyTranslater_PutAndGet":                propertyTranslaterPutAndGet,
    "Filter_PropertyTranslaterMustError":          filterPropertyTranslaterMustError,
    "Query_Count":                                 queryCount,
    "Query_GetAll":                                queryGetAll,
    "Query_Cursor":                                queryCursor,
    "Query_NextByPropertyList":                    queryNextByPropertyList,
    "Query_GetAllByPropertyListSlice":             queryGetAllByPropertyListSlice,
    "Filter_Basic":                                filterBasic,
    "Filter_PropertyTranslater":                   filterPropertyTranslater,
    "Filter_PropertyTranslaterWithOriginalTypes":  filterPropertyTranslaterWithOriginalTypes,
    "Transaction_Commit":                          transactionCommit,
    "Transaction_Rollback":                        transactionRollback,
    "Transaction_JoinAncesterQuery":               transactionJoinAncesterQuery,
    "RunInTransaction_Commit":                     runInTransactionCommit,
    "RunInTransaction_Rollback":                   runInTransactionRollback,
    "TransactionBatch_Put":                        transactionBatchPut,
    "TransactionBatch_PutWithCustomErrHandler":    transactionBatchPutWithCustomErrHandler,
    "TransactionBatch_PutAndAllocateIDs":          transactionBatchPutAndAllocateIDs,
    "TransactionBatch_Get":                        transactionBatchGet,
    "TransactionBatch_GetWithCustomErrHandler":    transactionBatchGetWithCustomErrHandler,
    "TransactionBatch_Delete":                     transactionBatchDelete,
    "TransactionBatch_DeleteWithCustomErrHandler": transactionBatchDeleteWithCustomErrHandler,
}

TestSuite contains all the test cases that this package provides.

func IsAEDatastoreClient Uses

func IsAEDatastoreClient(ctx context.Context) bool

IsAEDatastoreClient returns whether the context is used for AEDatastore.

func IsCloudDatastoreClient Uses

func IsCloudDatastoreClient(ctx context.Context) bool

IsCloudDatastoreClient returns whether the context is used for CloudDatastore.

func MergeTestSuite Uses

func MergeTestSuite(suite map[string]Test)

MergeTestSuite into this package's TestSuite.

func WrapAEFlag Uses

func WrapAEFlag(ctx context.Context) context.Context

WrapAEFlag add AEDatastore marker into context. use with IsAEDatastoreClient function.

func WrapCloudFlag Uses

func WrapCloudFlag(ctx context.Context) context.Context

WrapCloudFlag add CloudDatastore marker into context. use with IsCloudDatastoreClient function.

type Test Uses

type Test func(ctx context.Context, t *testing.T, client datastore.Client)

Test represents a test function for Datastore testing.

Directories

PathSynopsis
dsmiddleware/dslog
dsmiddleware/fishbone
dsmiddleware/localcache
dsmiddleware/rpcretry
favcliptools
realworld/recursivebatch
realworld/tbf

Package testsuite imports 12 packages (graph) and is imported by 7 packages. Updated 2019-02-28. Refresh now. Tools for package owners.