Help us shape the future of Go! Take the 2026 Go Developer Survey

testinfra

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Chdir          string            `mapstructure:"chdir" required:"false"`
	Compact        bool              `mapstructure:"compact" required:"false"`
	DestinationDir string            `mapstructure:"destination_dir" required:"false"`
	EnvVars        map[string]string `mapstructure:"env_vars" required:"false"`
	InstallCmd     []string          `mapstructure:"install_cmd" required:"false"`
	JUnitXML       string            `mapstructure:"junit_xml" required:"false"`
	Keyword        string            `mapstructure:"keyword" required:"false"`
	Local          bool              `mapstructure:"local" required:"false"`
	LogLevel       string            `mapstructure:"log_level" required:"false"`
	Marker         string            `mapstructure:"marker" required:"false"`
	Parallel       bool              `mapstructure:"parallel" required:"false"`
	PytestPath     string            `mapstructure:"pytest_path" required:"false"`
	Retries        int               `mapstructure:"retries" required:"false"`
	Sudo           bool              `mapstructure:"sudo" required:"false"`
	SudoUser       string            `mapstructure:"sudo_user" required:"false"`
	TestFiles      []string          `mapstructure:"test_files" required:"false"`
	Verbose        int               `mapstructure:"verbose" required:"false"`
	// contains filtered or unexported fields
}

config data deserialized/unmarshalled from packer template/config

func (*Config) FlatMapstructure

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type FlatConfig

type FlatConfig struct {
	Chdir          *string           `mapstructure:"chdir" required:"false" cty:"chdir" hcl:"chdir"`
	Compact        *bool             `mapstructure:"compact" required:"false" cty:"compact" hcl:"compact"`
	DestinationDir *string           `mapstructure:"destination_dir" required:"false" cty:"destination_dir" hcl:"destination_dir"`
	EnvVars        map[string]string `mapstructure:"env_vars" required:"false" cty:"env_vars" hcl:"env_vars"`
	InstallCmd     []string          `mapstructure:"install_cmd" required:"false" cty:"install_cmd" hcl:"install_cmd"`
	JUnitXML       *string           `mapstructure:"junit_xml" required:"false" cty:"junit_xml" hcl:"junit_xml"`
	Keyword        *string           `mapstructure:"keyword" required:"false" cty:"keyword" hcl:"keyword"`
	Local          *bool             `mapstructure:"local" required:"false" cty:"local" hcl:"local"`
	LogLevel       *string           `mapstructure:"log_level" required:"false" cty:"log_level" hcl:"log_level"`
	Marker         *string           `mapstructure:"marker" required:"false" cty:"marker" hcl:"marker"`
	Parallel       *bool             `mapstructure:"parallel" required:"false" cty:"parallel" hcl:"parallel"`
	PytestPath     *string           `mapstructure:"pytest_path" required:"false" cty:"pytest_path" hcl:"pytest_path"`
	Retries        *int              `mapstructure:"retries" required:"false" cty:"retries" hcl:"retries"`
	Sudo           *bool             `mapstructure:"sudo" required:"false" cty:"sudo" hcl:"sudo"`
	SudoUser       *string           `mapstructure:"sudo_user" required:"false" cty:"sudo_user" hcl:"sudo_user"`
	TestFiles      []string          `mapstructure:"test_files" required:"false" cty:"test_files" hcl:"test_files"`
	Verbose        *int              `mapstructure:"verbose" required:"false" cty:"verbose" hcl:"verbose"`
}

FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfig) HCL2Spec

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

implements the packer.Provisioner interface as testinfra.Provisioner

func (*Provisioner) ConfigSpec

func (provisioner *Provisioner) ConfigSpec() hcldec.ObjectSpec

implements configspec with hcl2spec helper function

func (*Provisioner) Prepare

func (provisioner *Provisioner) Prepare(raws ...any) error

prepares the provisioner plugin

func (*Provisioner) Provision

func (provisioner *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.Communicator, generatedData map[string]any) error

executes the provisioner plugin

Jump to

Keyboard shortcuts

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