distertester

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAssetDistTest

func RunAssetDistTest(t *testing.T,
	pluginProvider pluginapitester.PluginProvider,
	assetProvider pluginapitester.AssetProvider,
	testCases []TestCase,
)

RunAssetDistTest tests the "dist" operation using the provided asset. Uses the provided plugin provider and asset provider to resolve the plugin and asset and invokes the "dist" command.

func RunRepeatedDistTest added in v1.22.0

func RunRepeatedDistTest(t *testing.T,
	pluginProvider pluginapitester.PluginProvider,
	assetProvider pluginapitester.AssetProvider,
	distersCfg distgoconfig.DistersConfig,
)

RunRepeatedDistTest verifies that running the "dist" task multiple times with the provided DistersConfig will succeed without error. This test generates a single build artifact and runs the "dist" task in a way that ignores the build cache to verify the behavior of strictly running "dist" multiple times.

Types

type TestCase

type TestCase struct {
	Name        string
	Specs       []gofiles.GoFileSpec
	ConfigFiles map[string]string
	WantError   bool
	WantOutput  func(projectDir string) string
	Validate    func(projectDir string)
}

Jump to

Keyboard shortcuts

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