gmodel

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gmodel provides Gomega matches for lxkns model elements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeSameNamespace

func BeSameNamespace(expectedns interface{}) types.GomegaMatcher

BeSameNamespace returns a types.GomegaMatcher which compares an actual namespace to an expected namespace. A namespace is anything supporting at least the model.Namespace interface, as well as optionally (and depending on the type of namespace) model.Hierarchy and model.Ownership.

func BeSameProcess

func BeSameProcess(expectedprocess interface{}) types.GomegaMatcher

BeSameProcess returns a types.GomegaMatcher which compares an actual model.Process to an expected Process, using only a (semi-) flat comparism for equality. In particular, PID, PPID, Name, Cmdline, and Starttime are compared directly, since they are “flat” types. Additionally, it also checks the joined Namespaces for their IDs and types. But this matcher doesn't check the related Parent and Children Process objects; use BeSameTreeProcess instead.

func BeSameProcessTable

func BeSameProcessTable(expectedproctable interface{}) types.GomegaMatcher

BeSameProcessTable returns a types.GomegaMatcher which compares an actual model.ProcessTable to an expected ProcessTable. This matcher doesn't test for deep equality (you could do this already using the existing matchers) but instead does only flat model.Process matching.

func BeSameTreeProcess

func BeSameTreeProcess(expectedprocess interface{}) types.GomegaMatcher

BeSameTreeProcess returns a types.GomegaMatcher which compares an actual model.Process to an expected Process, using only a (semi-) flat comparism for equality. In particular, PID, PPID, Name, Cmdline, and Starttime are compared directly, since they are “flat” types. The Parent and Children Process(es) are compared only for their PIDs (but not grandchildren, and so on). And the (joined) Namespaces are also only compared for their ID and type, but not anything beyond those two main properties.

func BeSimilarTask added in v0.24.0

func BeSimilarTask(expectedtask any) types.GomegaMatcher

Types

This section is empty.

Jump to

Keyboard shortcuts

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