Documentation ¶
Index ¶
- func DefaultConfig(t *testing.T) (*config.FileConfig, []service.FileDescriptor)
- func MakeAndRunTestAuthServer(t *testing.T, log utils.Logger, fc *config.FileConfig, ...) (auth *service.TeleportProcess)
- func MakeBot(t *testing.T, client auth.ClientI, name string, roles ...string) *proto.CreateBotResponse
- func MakeBotAuthClient(t *testing.T, fc *config.FileConfig, ident *identity.Identity) auth.ClientI
- func MakeDefaultAuthClient(t *testing.T, log utils.Logger, fc *config.FileConfig) auth.ClientI
- func MakeMemoryBotConfig(t *testing.T, fc *config.FileConfig, botParams *proto.CreateBotResponse) *botconfig.BotConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
func DefaultConfig(t *testing.T) (*config.FileConfig, []service.FileDescriptor)
DefaultConfig returns a FileConfig to be used in tests, with random listen addresses that are tied to the listeners returned in the FileDescriptor slice, which should be passed as exported file descriptors to NewTeleport; this is to ensure that we keep the listening socket open, to prevent other processes from using the same port before we're done with it.
func MakeAndRunTestAuthServer ¶
func MakeAndRunTestAuthServer(t *testing.T, log utils.Logger, fc *config.FileConfig, fds []service.FileDescriptor) (auth *service.TeleportProcess)
MakeAndRunTestAuthServer creates an auth server useful for testing purposes.
func MakeBot ¶
func MakeBot(t *testing.T, client auth.ClientI, name string, roles ...string) *proto.CreateBotResponse
MakeBot creates a server-side bot and returns joining parameters.
func MakeBotAuthClient ¶
MakeBotAuthClient creates a new auth client using a Bot identity.
func MakeDefaultAuthClient ¶
MakeDefaultAuthClient reimplements the bare minimum needed to create a default root-level auth client for a Teleport server started by MakeAndRunTestAuthServer.
func MakeMemoryBotConfig ¶
func MakeMemoryBotConfig(t *testing.T, fc *config.FileConfig, botParams *proto.CreateBotResponse) *botconfig.BotConfig
MakeMemoryBotConfig creates a usable bot config from joining parameters. It only writes artifacts to memory and can be further modified if desired.
Types ¶
This section is empty.