Documentation ¶
Overview ¶
Package lokitest provides test methods using which the plugins can validate whether they implement loki correctly or not.
Index ¶
- func ValidateAfterKill(ctx context.Context, t *testing.T, plugin *Plugin, config *Configuration)
- func ValidateAfterSystemLoad(ctx context.Context, t *testing.T, plugin *Plugin)
- func ValidateAll(ctx context.Context, t *testing.T, plugin *Plugin, config *Configuration)
- func ValidateDestroyerParse(ctx context.Context, t *testing.T, plugin *Plugin, config *Configuration)
- type Configuration
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAfterKill ¶
ValidateAfterKill validates that validation fails if called immediately after few resources are killed. So we check that when system is not in desired state, validation fails.
func ValidateAfterSystemLoad ¶
ValidateAfterSystemLoad validates that validation passes if called immediately after system is loaded. So we check that when system is in desired state, validation succeeds.
func ValidateAll ¶
ValidateAll validates all functionalities of the plugin.
func ValidateDestroyerParse ¶
func ValidateDestroyerParse(ctx context.Context, t *testing.T, plugin *Plugin, config *Configuration)
ValidateDestroyerParse validates that destroyer can parse destroy section without error.
Types ¶
type Configuration ¶
type Configuration struct { // Identifiers is the list of resource IDs which should be killed to validate that system shows validation as false. Identifiers loki.Identifiers // DestroySection is sample destroy section to validate that destroyer can parse without error. DestroySection map[string]interface{} }
Configuration contains data needed to run tests through which a plugin can be validated.