gmodel

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 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 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 GomegaMatcher which compares an actual 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 GomegaMatcher which compares an actual 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 Process matching.

func BeSameTreeProcess

func BeSameTreeProcess(expectedprocess interface{}) types.GomegaMatcher

BeSameTreeProcess returns a GomegaMatcher which compares an actual 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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