Documentation ¶
Index ¶
- func DockerRun(tb testing.TB, args ...string) (containerId string)
- func ExecWGCurl(readyWG *sync.WaitGroup, retries uint, args ...string) error
- func GetDefaultObserver(tb testing.TB, ctx context.Context, lib string, opts ...TestOption) (*observer.Observer, error)
- func GetDefaultObserverWithBase(tb testing.TB, ctx context.Context, b *sensors.Sensor, file, lib string, ...) (*observer.Observer, error)
- func GetDefaultObserverWithConfig(tb testing.TB, ctx context.Context, config, lib string, opts ...TestOption) (*observer.Observer, error)
- func GetDefaultObserverWithFile(tb testing.TB, ctx context.Context, file, lib string, opts ...TestOption) (*observer.Observer, error)
- func GetDefaultObserverWithWatchers(tb testing.TB, ctx context.Context, base *sensors.Sensor, opts ...TestOption) (*observer.Observer, error)
- func GetDefaultSensorsWithFile(tb testing.TB, file, lib string, opts ...TestOption) ([]*sensors.Sensor, error)
- func GetMyPid() uint32
- func LoopEvents(ctx context.Context, tb testing.TB, doneWG, readyWG *sync.WaitGroup, ...)
- func WaitForProcess(process string) error
- func WriteConfigFile(fileName, config string) error
- type TestOption
- type TestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerRun ¶
dockerRun starts a new docker container in the background. The container will be killed and removed on test cleanup. It returns the containerId on success, or an error if spawning the container failed.
func GetDefaultObserver ¶
func LoopEvents ¶
func WaitForProcess ¶
Used to wait for a process to start, we do a lookup on PROCFS because this may be called before obs is created.
func WriteConfigFile ¶
Types ¶
type TestOption ¶
type TestOption func(*TestOptions)
func WithAllowList ¶
func WithAllowList(allowList *tetragon.Filter) TestOption
func WithConfig ¶
func WithConfig(config string) TestOption
func WithDenyList ¶
func WithDenyList(denyList *tetragon.Filter) TestOption
func WithLib ¶
func WithLib(lib string) TestOption
func WithMyPid ¶
func WithMyPid() TestOption
Filter for the gotest process and its children in the export
type TestOptions ¶
type TestOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.