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.
Click to show internal directories.
Click to hide internal directories.