testing

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginTester

type PluginTester struct {
	// contains filtered or unexported fields
}

PluginTester is a helper util to load a plugin using the engine that will use Sloth. In the sense of an acceptance/integration test.

This has benefits over loading the plugin directly with Go, by using this method you will be sure that what is executed is what the sloth will execute at runtime, so, if you use a not supported feature or the engine has a bug, this will be detected on the tests instead of Sloth runtime on execution.

func NewPluginTester

func NewPluginTester(pluginPath string) (*PluginTester, error)

func (*PluginTester) AssertYAML

func (p *PluginTester) AssertYAML(t *testing.T, expYAML string, kmeta model.K8sMeta, slos model.PromSLOGroupResult)

AssertYAML asserts that the given SLOs when transformed by the plugin produce the expected YAML output.

Jump to

Keyboard shortcuts

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