Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestPoliteiad ¶
type TestPoliteiad struct { sync.RWMutex URL string // Base url of form http://ipaddr:port PublicIdentity *identity.PublicIdentity FullIdentity *identity.FullIdentity // contains filtered or unexported fields }
TestPoliteiad provides an implementation of the politeiad api that can be used for testing politeiad clients. The api is implemented using an httptest server and all records and plugin data is stored in memory.
func (*TestPoliteiad) AddRecord ¶
func (p *TestPoliteiad) AddRecord(t *testing.T, r v1.Record)
AddRecord adds a record to the politeiad records store. This function is intended to be used as a way to setup test data.
func (*TestPoliteiad) Plugin ¶
func (p *TestPoliteiad) Plugin(t *testing.T, pc v1.PluginCommand)
Plugin is a pass through function for plugin commands. This function is intended to be used as a way to setup test data.
Click to show internal directories.
Click to hide internal directories.