juju: github.com/juju/juju/worker/raft/rafttest Index | Files

package rafttest

import "github.com/juju/juju/worker/raft/rafttest"

Index

Package Files

fixtures.go helpers.go

func CheckConfiguration Uses

func CheckConfiguration(c *gc.C, r *raft.Raft, expectedServers []raft.Server)

CheckConfiguration waits some time for the Raft to have the expected server configuration.

type RaftFixture Uses

type RaftFixture struct {
    testing.IsolationSuite

    FSM           raft.FSM
    Config        *raft.Config
    Transport     *raft.InmemTransport
    Store         *raft.InmemStore
    SnapshotStore *raft.InmemSnapshotStore
    Raft          *raft.Raft
}

RaftFixture is a fixture to embed into test suites, providing a raft.Raft and in-memory transport.

func (*RaftFixture) DefaultConfig Uses

func (s *RaftFixture) DefaultConfig(id raft.ServerID) *raft.Config

func (*RaftFixture) NewRaft Uses

func (s *RaftFixture) NewRaft(c *gc.C, id raft.ServerID, fsm raft.FSM) (
    *raft.Raft,
    *raft.Config,
    *raft.InmemTransport,
    *raft.InmemStore,
    *raft.InmemSnapshotStore,
)

func (*RaftFixture) SetUpTest Uses

func (s *RaftFixture) SetUpTest(c *gc.C)

Package rafttest imports 10 packages (graph). Updated 2018-07-06. Refresh now. Tools for package owners.