testaccount

package
v0.0.0-...-4d14c86 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package testaccount gives tests an account to act for, inside their rolled-back transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t *testing.T, ctx context.Context, tx bun.Tx) (context.Context, bun.Tx)

New creates an account in tx and returns ctx acting for it, with a savepoint of tx begun with that ctx: a bun.Tx hands its RunInTx functions the ctx it began with, so processes nested in a transaction keep the account. Its name is unique per run; no real password: hashing one would only slow the tests down.

Types

This section is empty.

Jump to

Keyboard shortcuts

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