dbtest

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 22 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},
	{"GetConfiguration", TGetConfiguration},
	{"SignerInfoConcurrent", TSignerInfoConcurrent},
	{"RegisterIdentityDescriptor", TRegisterIdentityDescriptor},
}
View Source
var IdentityNotificationCases = []struct {
	Name string
	Fn   func(*testing.T, driver.IdentityStore)
}{
	{"IdentityNotifier", TIdentityNotifier},
}
View Source
var KeyStoreCases = []struct {
	Name string
	Fn   func(*testing.T, driver.KeyStore)
}{
	{"TKeyStoreAddGet", TKeyStoreAddGet},
}
View Source
var TokenNotifierCases = []struct {
	Name string
	Fn   func(*testing.T, TestTokenDB, driver.TokenNotifier)
}{
	{"TokenNotifier", TTokenNotifier},
	{"SubscribeStore", TSubscribeStore},
	{"SubscribeStoreDelete", TSubscribeStoreDelete},
	{"SubscribeStoreNoCommit", TSubscribeStoreNoCommit},
	{"SubscribeRead", TSubscribeRead},
}

Functions

func EValidationRecordQueries

func EValidationRecordQueries(t *testing.T, db driver3.EndorserStore)

func EndorserTest

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

func IdentityTest

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

func KeyStoreTest

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

func TAllowsSameTxID

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

func TCertification

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

func TConfigurations

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

func TDeleteAndMine

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

func TDeleteMultiple

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

func TDuplicate

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

func TEndorserAcks

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

func TFailsIfRequestDoesNotExist

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

func TGetConfiguration

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

func TGetDeletedTokensPendingSKICleanup

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

func TGetTokenInfos

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

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

func TIdentityNotifier

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

func TKeyStoreAddGet

func TKeyStoreAddGet(t *testing.T, db driver.KeyStore)

func TListAuditTokens

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

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

func TListIssuedTokens

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

func TListUnspentTokensByWallets

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

TListUnspentTokensByWallets exercises the batch variant of ListUnspentTokensBy. Seeds tokens across multiple wallets — two via the ownership wallet_id column (StoreToken's owner list) and one via the owner_wallet_id column on TokenRecord — then verifies the batch method partitions results correctly and honors the empty-input / missing-wallet / type-filter contracts.

func TMovements

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

func TPublicParams

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

func TQueryTokenDetails

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

func TRegisterIdentityDescriptor

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

func TRollback

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

func TSaveAndGetToken

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

func TSignerInfo

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

func TSignerInfoConcurrent

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

func TStatus

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

func TStoresTimestamp

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

func TSubscribeRead

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

func TSubscribeStore

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

func TSubscribeStoreDelete

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

func TSubscribeStoreNoCommit

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

func TTokenNotifier

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

func TTokenRequest

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

func TTokenTransaction

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

func TTokenTypes

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

func TTransaction

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

func TTransactionQueries

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

func TWalletIdentities

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

func TestFully

func TestFully(t *testing.T, tokenDB driver3.TokenStore, tokenLockDB driver3.TokenLockStore, tokenTransactionDB driver3.TokenTransactionStore)

func TokenLocksTest

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

func TokensTest

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

func TransactionsTest

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

func WalletTest

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

Types

type TestTokenDB

type TestTokenDB interface {
	driver.TokenStore

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

type Value

type Value struct {
	V string
}

Jump to

Keyboard shortcuts

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