Documentation
¶
Index ¶
- type Option
- type Upgrade
- func (u *Upgrade) Cleanup(t *testing.T)
- func (u *Upgrade) DB() *sqlite.SQLite
- func (u *Upgrade) From() *daprd.Daprd
- func (u *Upgrade) Restart(t *testing.T, ctx context.Context, d *daprd.Daprd, reg *task.TaskRegistry) *client.TaskHubGrpcClient
- func (u *Upgrade) Run(t *testing.T, ctx context.Context)
- func (u *Upgrade) Scheduler() *scheduler.Scheduler
- func (u *Upgrade) Start(t *testing.T, ctx context.Context, d *daprd.Daprd, reg *task.TaskRegistry) *client.TaskHubGrpcClient
- func (u *Upgrade) To() *daprd.Daprd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
func WithMasterToLegacy ¶
func WithMasterToLegacy() Option
WithMasterToLegacy starts the workflow on the master daprd and finishes it on the latest release. The default is the reverse.
type Upgrade ¶
type Upgrade struct {
// contains filtered or unexported fields
}
Upgrade is a control plane plus two daprds that share an app ID and an on-disk actor state store: From runs the binary at DAPR_INTEGRATION_DAPRD_LEGACY_PATH and To runs the one under test, or the reverse with WithMasterToLegacy. Run starts only the control plane; the test starts From, kills it mid-workflow and then starts To.
func New ¶
New skips the test when no legacy daprd binary is configured or a workflow mode other than the default is selected.
func (*Upgrade) Restart ¶
func (u *Upgrade) Restart(t *testing.T, ctx context.Context, d *daprd.Daprd, reg *task.TaskRegistry) *client.TaskHubGrpcClient
Restart restarts d, dropping its in-memory actor state so it reloads what a test wrote to the store, and returns a client with a worker serving reg reconnected to it.