Documentation ¶
Index ¶
- func DockerCreate(tb testing.TB, args ...string) (containerId string)
- func DockerExec(tb testing.TB, id string, args ...string)
- func DockerRun(tb testing.TB, args ...string) (containerId string)
- func DockerStart(tb testing.TB, id 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 GetDefaultSensorsWithBase(tb testing.TB, b *sensors.Sensor, file, lib string, opts ...TestOption) ([]*sensors.Sensor, 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
- func WithAllowList(allowList *tetragon.Filter) TestOption
- func WithConfig(config string) TestOption
- func WithContainerId(id string) TestOption
- func WithDenyList(denyList *tetragon.Filter) TestOption
- func WithLib(lib string) TestOption
- func WithMyPid() TestOption
- func WithProcCacheGCInterval(GCInterval time.Duration) TestOption
- type TestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerCreate ¶ added in v1.3.0
DockerCreate creates 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 DockerExec ¶ added in v1.3.0
dockerExec executes a command in a container.
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 DockerStart ¶ added in v1.3.0
DockerStart starts a new docker container with a given ID.
func GetDefaultObserver ¶
func GetDefaultSensorsWithBase ¶ added in v1.2.1
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 WithContainerId ¶ added in v1.3.0
func WithContainerId(id string) TestOption
Filter for a container id by prefix in event export
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
func WithProcCacheGCInterval ¶ added in v1.2.1
func WithProcCacheGCInterval(GCInterval time.Duration) TestOption
type TestOptions ¶
type TestOptions struct {
// contains filtered or unexported fields
}