testenv

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package testenv contains common helpers for tests

Index

Constants

View Source
const Timeout = 5 * time.Minute

Variables

This section is empty.

Functions

func AssetPath

func AssetPath(p ...string) string

AssetPath returns the path to an asset

func ExamplePath

func ExamplePath(p ...string) string

ExamplePath returns the path to the fleet examples

func RandomFilename added in v0.5.0

func RandomFilename(filename string) string

RandomName returns a slightly random name, so temporary assets don't conflict

func Root

func Root() string

Root returns the relative path to the repositories root

func SetRoot

func SetRoot(dir string)

SetRoot set the root path for the other relative paths, e.g. AssetPath. Usually set to point to the repositories root.

func Template added in v0.5.0

func Template(output string, tmplPath string, data any) error

Template loads a gotemplate from a file and writes templated output to another file, preferably in a temp dir

Types

type Env

type Env struct {
	Kubectl    kubectl.Command
	Fleet      string
	Downstream string
	Namespace  string
}

func New

func New() *Env

Directories

Path Synopsis
infra module
Package kubectl is a wrapper around the kubectl CLI
Package kubectl is a wrapper around the kubectl CLI

Jump to

Keyboard shortcuts

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