testutil

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testutil provides utilities for test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dashboard added in v0.4.0

func Dashboard() *graylog.Dashboard

Dashboard returns a new Dashboard.

func DummyAdmin

func DummyAdmin() *graylog.User

DummyAdmin returns a new Admin user.

func DummyStream

func DummyStream() *graylog.Stream

DummyStream returns a Stream.

func FullDashboard added in v0.4.0

func FullDashboard() *graylog.Dashboard

FullDashboard returns a new Dashboard.

func GetIndexSet

func GetIndexSet(cl *client.Client, server *mockserver.Server, prefix string) (*graylog.IndexSet, func(string), error)

GetIndexSet returns an IndexSet.

func GetNonAdminUser

func GetNonAdminUser(cl *client.Client) (*graylog.User, error)

GetNonAdminUser returns a user whose name is not "admin".

func GetRoleOrCreate

func GetRoleOrCreate(cl *client.Client, name string) (*graylog.Role, error)

GetRoleOrCreate gets a given name's role. If no role whose name is a given name exists, create a role with a given name and returns it.

func GetServerAndClient

func GetServerAndClient() (*mockserver.Server, *client.Client, error)

GetServerAndClient returns server and client.

func GetStream

func GetStream(cl *client.Client, server *mockserver.Server, mode int) (*graylog.Stream, func(string), error)

GetStream returns a stream.

func IndexSet

func IndexSet(prefix string) *graylog.IndexSet

IndexSet returns a new IndexSet.

func Input

func Input() *graylog.Input

Input returns a new Input.

func Role

func Role() *graylog.Role

Role returns a new Role.

func Stream

func Stream() *graylog.Stream

Stream returns a new Stream.

func StreamRule

func StreamRule() *graylog.StreamRule

StreamRule returns a new StreamRule.

func User

func User() *graylog.User

User returns a new User.

func WaitAfterCreateIndexSet

func WaitAfterCreateIndexSet(server *mockserver.Server)

WaitAfterCreateIndexSet waits for a while after creates an index set if server is not a mock server.

func WaitAfterDeleteIndexSet

func WaitAfterDeleteIndexSet(server *mockserver.Server)

WaitAfterDeleteIndexSet waits for a while after deletes an index set if server is not a mock server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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