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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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