Documentation ¶
Index ¶
- func DefaultBotConfig(t *testing.T, fc *config.FileConfig, onboarding *botconfig.OnboardingConfig, ...) *botconfig.BotConfig
- func DefaultConfig(t *testing.T) (*config.FileConfig, []*servicecfg.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) (*botconfig.OnboardingConfig, *machineidv1pb.Bot)
- func MakeDefaultAuthClient(t *testing.T, log utils.Logger, fc *config.FileConfig) auth.ClientI
- type DefaultBotConfigOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultBotConfig ¶
func DefaultBotConfig( t *testing.T, fc *config.FileConfig, onboarding *botconfig.OnboardingConfig, outputs []botconfig.Output, opts DefaultBotConfigOpts, ) *botconfig.BotConfig
DefaultBotConfig creates a usable bot config from joining parameters. By default it: - Has the outputs provided to it via the parameter `outputs` - Runs in oneshot mode - Uses a memory storage destination - Does not verify Proxy WebAPI certificates
func DefaultConfig ¶
func DefaultConfig(t *testing.T) (*config.FileConfig, []*servicecfg.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 []*servicecfg.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) (*botconfig.OnboardingConfig, *machineidv1pb.Bot)
MakeBot creates a server-side bot and returns joining parameters.
func MakeDefaultAuthClient ¶
MakeDefaultAuthClient reimplements the bare minimum needed to create a default root-level auth client for a Teleport server started by MakeAndRunTestAuthServer.