pluginapitester

package
v2.0.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pluginapitester provides functions that simulate invoking a plugin from gödel. Can be used to test plugin implementations in plugin projects.

Package pluginapitester provides functions that simulate invoking a plugin from gödel. Can be used to test plugin implementations in plugin projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAsset

func RunAsset(
	pluginLocator artifactresolver.LocatorWithResolverParam,
	assetPaths []string,
	taskName string,
	args []string,
	projectDir string,
	debug bool,
	stdout io.Writer) (cleanup func(), rErr error)

RunAsset resolves the plugin with the provided locator and then runs it with the specified assets using RunPlugin. Can be used to test assets for which the plugin is published separately.

func RunPlugin

func RunPlugin(
	pluginPath string,
	assets []string,
	taskName string,
	args []string,
	projectDir string,
	debug bool,
	stdout io.Writer) (cleanup func(), rErr error)

RunPlugin runs a plugin with the specified arguments. The plugin is loaded in the same manner that it would be for gödel itself. RunPlugin is equivalent to calling "./godelw [taskName] [args]" where "godelw" is in "projectDir". Note that this call does not change the working directory, so any arguments that take relative paths should take that into account. If "debug" is true, then it is the equivalent of calling "./godelw --debug [taskName] [args]". If the project directory does not contain a file named "godelw", this function creates the path. The returned "cleanup" function removes the "godelw" file if it was created by this function and is suitable to defer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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