gauntlet

package
v0.0.0-...-4c65698 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Overview

Package gauntlet enables the framework to interface with the plugin gauntlet project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecCommandOptions

type ExecCommandOptions struct {
	ErrHandling       []string
	CheckErrorsInRead bool
	RetryCount        int
	RetryDelay        time.Duration
}

type Gauntlet

type Gauntlet struct {
	Command       string
	Network       string
	NetworkConfig map[string]string
	// contains filtered or unexported fields
}

Gauntlet contains helpful data to run gauntlet commands

func NewGauntlet

func NewGauntlet() (*Gauntlet, error)

NewGauntlet Sets up a gauntlet struct and checks if the yarn executable exists.

func (*Gauntlet) AddNetworkConfigVar

func (g *Gauntlet) AddNetworkConfigVar(k string, v string)

func (*Gauntlet) ExecCommand

func (g *Gauntlet) ExecCommand(args []string, options ExecCommandOptions) (string, error)

ExecCommand Executes a gauntlet or yarn command with the provided arguments.

It will also check for any errors you specify in the output via the errHandling slice.

func (*Gauntlet) ExecCommandWithRetries

func (g *Gauntlet) ExecCommandWithRetries(args []string, options ExecCommandOptions) (string, error)

ExecCommandWithRetries Some commands are safe to retry and in ci this can be even more so needed.

func (*Gauntlet) Flag

func (g *Gauntlet) Flag(flag, value string) string

Flag returns a string formatted in the expected gauntlet's flag form

func (*Gauntlet) GenerateRandomNetwork

func (g *Gauntlet) GenerateRandomNetwork()

GenerateRandomNetwork Creates and sets a random network prepended with test

func (*Gauntlet) SetWorkingDir

func (g *Gauntlet) SetWorkingDir(workDir string)

func (*Gauntlet) WriteNetworkConfigMap

func (g *Gauntlet) WriteNetworkConfigMap(networkDirPath string) error

WriteNetworkConfigMap write a network config file for gauntlet testing.

func (*Gauntlet) WriteNetworkConfigVar

func (g *Gauntlet) WriteNetworkConfigVar(networkDirPath string, k string, v string) error

Jump to

Keyboard shortcuts

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