dbtest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TST = token.Type("TST")
	ABC = token.Type("ABC")
)

Variables

View Source
var IdentityCases = []struct {
	Name string
	Fn   func(*testing.T, driver.IdentityStore)
}{
	{"IdentityInfo", TIdentityInfo},
	{"SignerInfo", TSignerInfo},
	{"Configurations", TConfigurations},
	{"SignerInfoConcurrent", TSignerInfoConcurrent},
}
View Source
var TokenNotifierCases = []struct {
	Name string
	Fn   func(*testing.T, TestTokenDB, driver.TokenNotifier)
}{
	{"SubscribeStore", TSubscribeStore},
	{"SubscribeStoreDelete", TSubscribeStoreDelete},
	{"SubscribeStoreNoCommit", TSubscribeStoreNoCommit},
	{"SubscribeRead", TSubscribeRead},
}

Functions

func IdentityTest added in v0.5.0

func IdentityTest(t *testing.T, cfgProvider cfgProvider)

func TAllowsSameTxID

func TAllowsSameTxID(t *testing.T, db driver.TokenTransactionStore)

func TCertification added in v0.5.0

func TCertification(t *testing.T, db TestTokenDB)

func TConfigurations added in v0.5.0

func TConfigurations(t *testing.T, db driver.IdentityStore)

func TDeleteAndMine added in v0.5.0

func TDeleteAndMine(t *testing.T, db TestTokenDB)

func TDeleteMultiple added in v0.5.0

func TDeleteMultiple(t *testing.T, db TestTokenDB)

func TDuplicate added in v0.5.0

func TDuplicate(t *testing.T, db driver.WalletStore)

func TEndorserAcks

func TEndorserAcks(t *testing.T, db driver.TokenTransactionStore)

func TFailsIfRequestDoesNotExist

func TFailsIfRequestDoesNotExist(t *testing.T, db driver.TokenTransactionStore)

func TGetTokenInfos added in v0.5.0

func TGetTokenInfos(t *testing.T, db TestTokenDB)

GetTokenMetadata retrieves the token information for the passed ids. For each id, the callback is invoked to unmarshal the token information

func TIdentityInfo added in v0.5.0

func TIdentityInfo(t *testing.T, db driver.IdentityStore)

func TListAuditTokens added in v0.5.0

func TListAuditTokens(t *testing.T, db TestTokenDB)

// ListAuditTokens returns the audited tokens associated to the passed ids

func TListIssuedTokens added in v0.5.0

func TListIssuedTokens(t *testing.T, db TestTokenDB)

func TMovements

func TMovements(t *testing.T, db driver.TokenTransactionStore)

func TPublicParams added in v0.5.0

func TPublicParams(t *testing.T, db TestTokenDB)

func TQueryTokenDetails added in v0.5.0

func TQueryTokenDetails(t *testing.T, db TestTokenDB)

func TRollback

func TRollback(t *testing.T, db driver.TokenTransactionStore)

func TSaveAndGetToken added in v0.5.0

func TSaveAndGetToken(t *testing.T, db TestTokenDB)

func TSignerInfo added in v0.5.0

func TSignerInfo(t *testing.T, db driver.IdentityStore)

func TSignerInfoConcurrent added in v0.5.0

func TSignerInfoConcurrent(t *testing.T, db driver.IdentityStore)

func TStatus

func TStatus(t *testing.T, db driver.TokenTransactionStore)

func TStoresTimestamp

func TStoresTimestamp(t *testing.T, db driver.TokenTransactionStore)

func TSubscribeRead added in v0.5.0

func TSubscribeRead(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)

func TSubscribeStore added in v0.5.0

func TSubscribeStore(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)

func TSubscribeStoreDelete added in v0.5.0

func TSubscribeStoreDelete(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)

func TSubscribeStoreNoCommit added in v0.5.0

func TSubscribeStoreNoCommit(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)

func TTokenRequest

func TTokenRequest(t *testing.T, db driver.TokenTransactionStore)

func TTokenTransaction added in v0.5.0

func TTokenTransaction(t *testing.T, db TestTokenDB)

func TTokenTypes added in v0.5.0

func TTokenTypes(t *testing.T, db TestTokenDB)

func TTransaction

func TTransaction(t *testing.T, db driver.TokenTransactionStore)

func TTransactionQueries

func TTransactionQueries(t *testing.T, db driver.TokenTransactionStore)

func TValidationRecordQueries

func TValidationRecordQueries(t *testing.T, db driver.TokenTransactionStore)

func TWalletIdentities added in v0.5.0

func TWalletIdentities(t *testing.T, db driver.WalletStore)

func TestFully

func TestFully(t *testing.T, tokenLockDB driver.TokenLockStore, tokenTransactionDB driver.TokenTransactionStore)

func TokenLocksTest added in v0.5.0

func TokenLocksTest(t *testing.T, cfgProvider cfgProvider)

func TokensTest added in v0.5.0

func TokensTest(t *testing.T, cfgProvider cfgProvider)

func TransactionsTest added in v0.5.0

func TransactionsTest(t *testing.T, cfgProvider cfgProvider)

func WalletTest added in v0.5.0

func WalletTest(t *testing.T, cfgProvider cfgProvider)

Types

type TestTokenDB added in v0.5.0

type TestTokenDB interface {
	driver.TokenStore

	StoreToken(ctx context.Context, tr driver.TokenRecord, owners []string) error
	GetAllTokenInfos(ctx context.Context, ids []*token.ID) ([][]byte, error)
}

Jump to

Keyboard shortcuts

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