test

package
v0.29.10 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestIDCeiling = 100000
	BuildWaitTime = 5 * time.Minute
)

Variables

This section is empty.

Functions

func CompileFuryctl

func CompileFuryctl(outputPath string) func()

func ConnectOpenVPN

func ConnectOpenVPN(certPath string) (*gexec.Session, error)

func Copy

func Copy(src, dst string)

func CreateFuryctlYaml

func CreateFuryctlYaml(s *ContextState, furyctlYamlTplName string, strategy FuryctlYamlCreatorStrategy)

func Download

func Download(toolName, version string) string

func DownloadFuryDistribution

func DownloadFuryDistribution(outDir, furyctlConfPath string) dist.DownloadResult

func DownloadFuryagent

func DownloadFuryagent(version string) string

func DownloadKubectl

func DownloadKubectl(version string) string

func DownloadTerraform

func DownloadTerraform(version string) string

func FuryctlYamlCreatorIdentityStrategy

func FuryctlYamlCreatorIdentityStrategy(prevData []byte) []byte

func KillOpenVPN

func KillOpenVPN() (*gexec.Session, error)

func Must0

func Must0(err error)

func Must1

func Must1[T any](t T, err error) T

func PrepareDirs

func PrepareDirs(testName string, testID int64) (string, string)

Types

type Conf

type Conf struct {
	APIVersion string   `validate:"required,api-version"  yaml:"apiVersion"`
	Kind       string   `validate:"required,cluster-kind" yaml:"kind"`
	Metadata   ConfMeta `validate:"required"              yaml:"metadata"`
	Spec       ConfSpec `validate:"required"              yaml:"spec"`
}

func LoadFuryCtl

func LoadFuryCtl(furyctlYamlPath string) Conf

type ConfMeta

type ConfMeta struct {
	Name string `validate:"required" yaml:"name"`
}

type ConfSpec

type ConfSpec struct {
	DistributionVersion string `validate:"required" yaml:"distributionVersion"`
}

type ContextState

type ContextState struct {
	TestID      int64  `json:"testId"`
	TestName    string `json:"testName"`
	ClusterName string `json:"clusterName"`
	Kubeconfig  string `json:"kubeconfig"`
	FuryctlYaml string `json:"furyctlYaml"`
	DataDir     string `json:"dataDir"`
	TestDir     string `json:"testDir"`
}

func NewContextState

func NewContextState(testName string) ContextState

type FuryctlCreator

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

func NewFuryctlCreator

func NewFuryctlCreator(furyctl, configPath, testDir string, dryRun bool) *FuryctlCreator

func (*FuryctlCreator) Create

func (f *FuryctlCreator) Create(phase, startFrom string) *exec.Cmd

type FuryctlDeleter

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

func NewFuryctlDeleter

func NewFuryctlDeleter(
	furyctl,
	configPath,
	testDir string,
	dryRun bool,
) *FuryctlDeleter

func (*FuryctlDeleter) Delete

func (f *FuryctlDeleter) Delete(phase string) *exec.Cmd

type FuryctlYamlCreatorStrategy

type FuryctlYamlCreatorStrategy func(prevData []byte) []byte

Jump to

Keyboard shortcuts

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