Documentation
¶
Index ¶
- Constants
- Variables
- func EValidationRecordQueries(t *testing.T, db driver3.EndorserStore)
- func EndorserTest(t *testing.T, cfgProvider cfgProvider)
- func IdentityTest(t *testing.T, cfgProvider cfgProvider)
- func KeyStoreTest(t *testing.T, cfgProvider cfgProvider)
- func TAllowsSameTxID(t *testing.T, db driver3.TokenTransactionStore)
- func TCertification(t *testing.T, db TestTokenDB)
- func TConfigurations(t *testing.T, db driver.IdentityStore)
- func TDeleteAndMine(t *testing.T, db TestTokenDB)
- func TDeleteMultiple(t *testing.T, db TestTokenDB)
- func TDuplicate(t *testing.T, db driver.WalletStore, _ driver.IdentityStore, ...)
- func TEndorserAcks(t *testing.T, db driver3.TokenTransactionStore)
- func TFailsIfRequestDoesNotExist(t *testing.T, db driver3.TokenTransactionStore)
- func TGetConfID(t *testing.T, db driver.WalletStore, _ driver.IdentityStore, ...)
- func TGetConfiguration(t *testing.T, db driver.IdentityStore)
- func TGetDeletedTokensPendingSKICleanup(t *testing.T, db TestTokenDB)
- func TGetExistingSignerInfo(t *testing.T, db driver.IdentityStore)
- func TGetTokenInfos(t *testing.T, db TestTokenDB)
- func TIdentityInfo(t *testing.T, db driver.IdentityStore)
- func TIdentityNotifier(t *testing.T, db driver.IdentityStore)
- func TIssuerBalance(t *testing.T, db TestTokenDB)
- func TKeyStoreAddGet(t *testing.T, db driver.KeyStore)
- func TListAuditTokens(t *testing.T, db TestTokenDB)
- func TListIssuedTokens(t *testing.T, db TestTokenDB)
- func TListUnspentTokensByWallets(t *testing.T, db TestTokenDB)
- func TMovements(t *testing.T, db driver3.TokenTransactionStore)
- func TPublicParams(t *testing.T, db TestTokenDB)
- func TQueryTokenDetails(t *testing.T, db TestTokenDB)
- func TRegisterIdentityDescriptor(t *testing.T, db driver.IdentityStore)
- func TRollback(t *testing.T, db driver3.TokenTransactionStore)
- func TSaveAndGetToken(t *testing.T, db TestTokenDB)
- func TSignerInfo(t *testing.T, db driver.IdentityStore)
- func TSignerInfoConcurrent(t *testing.T, db driver.IdentityStore)
- func TStatus(t *testing.T, db driver3.TokenTransactionStore)
- func TStoresTimestamp(t *testing.T, db driver3.TokenTransactionStore)
- func TSubscribeRead(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)
- func TSubscribeStore(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)
- func TSubscribeStoreDelete(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)
- func TSubscribeStoreNoCommit(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)
- func TTokenNotifier(t *testing.T, db TestTokenDB, notifier driver.TokenNotifier)
- func TTokenRequest(t *testing.T, db driver3.TokenTransactionStore)
- func TTokenTransaction(t *testing.T, db TestTokenDB)
- func TTokenTypes(t *testing.T, db TestTokenDB)
- func TTransaction(t *testing.T, db driver3.TokenTransactionStore)
- func TTransactionQueries(t *testing.T, db driver3.TokenTransactionStore)
- func TWalletConfigurationLink(t *testing.T, db driver.WalletStore, identityDB driver.IdentityStore, ...)
- func TWalletIdentities(t *testing.T, db driver.WalletStore, _ driver.IdentityStore, ...)
- func TestFully(t *testing.T, tokenDB driver3.TokenStore, tokenLockDB driver3.TokenLockStore, ...)
- func TokenLocksTest(t *testing.T, cfgProvider cfgProvider)
- func TokensTest(t *testing.T, cfgProvider cfgProvider)
- func TransactionsTest(t *testing.T, cfgProvider cfgProvider)
- func WalletTest(t *testing.T, cfgProvider cfgProvider)
- type TestTokenDB
- type Value
Constants ¶
const ( TST = token.Type("TST") ABC = token.Type("ABC") )
Variables ¶
var IdentityCases = []struct { Name string Fn func(*testing.T, driver.IdentityStore) }{ {"IdentityInfo", TIdentityInfo}, {"SignerInfo", TSignerInfo}, {"Configurations", TConfigurations}, {"GetConfiguration", TGetConfiguration}, {"SignerInfoConcurrent", TSignerInfoConcurrent}, {"GetExistingSignerInfo", TGetExistingSignerInfo}, {"RegisterIdentityDescriptor", TRegisterIdentityDescriptor}, }
var IdentityNotificationCases = []struct { Name string Fn func(*testing.T, driver.IdentityStore) }{ {"IdentityNotifier", TIdentityNotifier}, }
var KeyStoreCases = []struct { Name string Fn func(*testing.T, driver.KeyStore) }{ {"TKeyStoreAddGet", TKeyStoreAddGet}, }
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 IdentityTest ¶
func KeyStoreTest ¶
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, _ driver.IdentityStore, conf driver.IdentityConfiguration)
func TEndorserAcks ¶
func TEndorserAcks(t *testing.T, db driver3.TokenTransactionStore)
func TFailsIfRequestDoesNotExist ¶
func TFailsIfRequestDoesNotExist(t *testing.T, db driver3.TokenTransactionStore)
func TGetConfID ¶ added in v0.15.1
func TGetConfID(t *testing.T, db driver.WalletStore, _ driver.IdentityStore, conf driver.IdentityConfiguration)
TGetConfID asserts that GetConfID round-trips the confID passed to StoreIdentity for a given identity, regardless of which role it was bound under, and returns an empty string with no error for an identity that was never bound. This is the read side that SignerRouter relies on to pin a signer to exactly one KeyManager without probing every KeyManager registered under the identity's type.
func TGetConfiguration ¶
func TGetConfiguration(t *testing.T, db driver.IdentityStore)
func TGetDeletedTokensPendingSKICleanup ¶
func TGetDeletedTokensPendingSKICleanup(t *testing.T, db TestTokenDB)
func TGetExistingSignerInfo ¶ added in v0.15.1
func TGetExistingSignerInfo(t *testing.T, db driver.IdentityStore)
TGetExistingSignerInfo checks that GetExistingSignerInfo returns the hashes of exactly the identities for which signer info was stored, when queried with a mix of known and unknown identities.
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 TIssuerBalance ¶ added in v0.15.1
func TIssuerBalance(t *testing.T, db TestTokenDB)
TIssuerBalance verifies that IssuedBalance and RedeemedBalance sum the amounts of the issued and redeemed tokens respectively, honoring the token type filter, and that a redeemed token (empty owner) can be stored and is excluded from the issued balance.
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 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 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 TWalletConfigurationLink ¶ added in v0.15.1
func TWalletConfigurationLink(t *testing.T, db driver.WalletStore, identityDB driver.IdentityStore, conf driver.IdentityConfiguration)
TWalletConfigurationLink asserts that a wallet's conf_id, once stored, resolves back to the exact IdentityConfiguration it was linked to — i.e. that IdentityConfiguration.UniqueID() round-trips through GetConfiguration and can be used to join a Wallets row back to its originating IdentityConfigurations row.
func TWalletIdentities ¶
func TWalletIdentities(t *testing.T, db driver.WalletStore, _ driver.IdentityStore, conf driver.IdentityConfiguration)
func TestFully ¶
func TestFully(t *testing.T, tokenDB driver3.TokenStore, tokenLockDB driver3.TokenLockStore, tokenTransactionDB driver3.TokenTransactionStore)