import "github.com/pilosa/pilosa/test"
cluster.go field.go handler.go holder.go index.go logger.go pilosa.go
MustDo executes http.Do() with an http.NewRequest(). Panic on error.
MustMarshalJSON marshals v to JSON. Panic on error.
MustNewHTTPRequest creates a new HTTP request. Panic on error.
func NewBufferLogger() *bufferLogger
NewBufferLogger returns a new instance of BufferLogger.
func OptAllowedOrigins(origins []string) server.CommandOption
RetryUntil repeatedly executes fn until it returns nil or timeout occurs.
Ensure field can set its cache
Cluster represents a Pilosa cluster (multiple Command instances)
MustNewCluster creates a new cluster
MustRunCluster creates and starts a new cluster
Stop stops a Cluster
func (c Cluster) CreateField(t testing.TB, index string, iopts pilosa.IndexOptions, field string, fopts ...pilosa.FieldOption) *pilosa.Field
CreateField creates the index (if necessary) and field specified.
Query executes an API.Query through one of the cluster's node's API. It fails the test if there is an error.
Start runs a Cluster
////////////////////////////////////////////////////////////////////////////////// Command represents a test wrapper for server.Command.
MustRunCommand returns a new, running Main. Panic on error.
func NewCommandNode(isCoordinator bool, opts ...server.CommandOption) *Command
NewCommandNode returns a new instance of Command with clustering enabled.
func (m *Command) Client() *http.InternalClient
Client returns a client to connect to the program.
Close closes the program and removes the underlying data directory.
GossipAddress returns the address on which gossip is listening after a Main has been setup. Useful to pass as a seed to other nodes when creating and testing clusters.
func (m *Command) MustCreateField(tb testing.TB, index, field string, opts ...pilosa.FieldOption) *pilosa.Field
MustCreateField uses this command's API to create the field. The index must already exist - it fails the test if there is an error.
func (m *Command) MustCreateIndex(tb testing.TB, name string, opts pilosa.IndexOptions) *pilosa.Index
MustCreateIndex uses this command's API to create an index and fails the test if there is an error.
MustQuery uses this command's API to execute the given query request, failing if Query returns a non-nil error, otherwise returning the QueryResponse.
MustRecalculateCaches calls RecalculateCaches on the command's API, and fails if there is an error.
Query executes a query against the program through the HTTP API.
RecalculateCaches is deprecated. Use MustRecalculateCaches.
Reopen closes the program and reopens it.
URL returns the base URL string for accessing the running program.
type Field struct { *pilosa.Field }
Field represents a test wrapper for pilosa.Field.
type Holder struct { *pilosa.Holder }
Holder is a test wrapper for pilosa.Holder.
MustOpenHolder creates and opens a holder at a temporary path. Panic on error.
NewHolder returns a new instance of Holder with a temporary path.
ClearBit clears a bit on the given field.
Close closes the holder and removes all underlying data.
MustCreateIndexIfNotExists returns a given index. Panic on error.
MustSetBits sets columns on a row. Panic on error. This function does not accept a timestamp or quantum.
ReadRow returns a Row for a given field. If the field does not exist, it panics rather than creating the field.
Reopen instantiates and opens a new holder. Note that the holder must be Closed first.
Row returns a Row for a given field.
func (h *Holder) RowTime(index, field string, rowID uint64, t time.Time, quantum string) *pilosa.Row
SetBit sets a bit on the given field.
SetBitTime sets a bit with timestamp on the given field.
type Index struct { *pilosa.Index }
Index represents a test wrapper for pilosa.Index.
MustOpenIndex returns a new, opened index at a temporary path. Panic on error.
Close closes the index and removes the underlying data.
CreateField creates a field with the given options.
CreateFieldIfNotExists creates a field with the given options if it doesn't exist.
Reopen closes the index and reopens it.
type ModHasher struct{}
modHasher represents a simple, mod-based hashing.
Package test imports 20 packages (graph). Updated 2021-01-07. Refresh now. Tools for package owners.