test_project

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KluctlExecute

func KluctlExecute(t *testing.T, ctx context.Context, logFn func(args ...any), args ...string) (string, string, error)

Types

type KustomizeResource

type KustomizeResource struct {
	Name     string
	FileName string
	Content  interface{}
}

type TestProject

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

func NewTestProject

func NewTestProject(t *testing.T, opts ...TestProjectOption) *TestProject

func (*TestProject) AddDeploymentInclude

func (p *TestProject) AddDeploymentInclude(dir string, includePath string, tags []string)

func (*TestProject) AddDeploymentIncludes

func (p *TestProject) AddDeploymentIncludes(dir string)

func (*TestProject) AddDeploymentItem

func (p *TestProject) AddDeploymentItem(dir string, item *uo.UnstructuredObject)

func (*TestProject) AddExtraArgs added in v2.22.0

func (p *TestProject) AddExtraArgs(a ...string)

func (*TestProject) AddHelmDeployment

func (p *TestProject) AddHelmDeployment(dir string, repoUrl string, chartName, version string, releaseName string, namespace string, values map[string]any)

func (*TestProject) AddKustomizeDeployment

func (p *TestProject) AddKustomizeDeployment(dir string, resources []KustomizeResource, tags []string)

func (*TestProject) AddKustomizeResources

func (p *TestProject) AddKustomizeResources(dir string, resources []KustomizeResource)

func (*TestProject) CopyProjectSourceTo added in v2.22.0

func (p *TestProject) CopyProjectSourceTo(dst string) string

func (*TestProject) DeleteFile added in v2.22.0

func (p *TestProject) DeleteFile(pth string, message string)

func (*TestProject) DeleteKustomizeDeployment

func (p *TestProject) DeleteKustomizeDeployment(dir string)

func (*TestProject) Discriminator

func (p *TestProject) Discriminator(targetName string) string

func (*TestProject) GetDeploymentYaml

func (p *TestProject) GetDeploymentYaml(dir string) *uo.UnstructuredObject

func (*TestProject) GetGitRepo

func (p *TestProject) GetGitRepo() *git.Repository

func (*TestProject) GetGitWorktree

func (p *TestProject) GetGitWorktree() *git.Worktree

func (*TestProject) GetYaml

func (p *TestProject) GetYaml(path string) *uo.UnstructuredObject

func (*TestProject) GitRepoName

func (p *TestProject) GitRepoName() string

func (*TestProject) GitServer

func (p *TestProject) GitServer() *git2.TestGitServer

func (*TestProject) GitUrl

func (p *TestProject) GitUrl() string

func (*TestProject) GitUrlPath added in v2.23.0

func (p *TestProject) GitUrlPath() string

func (*TestProject) IsUseProcess added in v2.22.0

func (p *TestProject) IsUseProcess() bool

func (*TestProject) Kluctl

func (p *TestProject) Kluctl(t *testing.T, argsIn ...string) (string, string, error)

func (*TestProject) KluctlExecute

func (p *TestProject) KluctlExecute(t *testing.T, argsIn ...string) (string, string, error)

func (*TestProject) KluctlMust

func (p *TestProject) KluctlMust(t *testing.T, argsIn ...string) (string, string)

func (*TestProject) KluctlProcess

func (p *TestProject) KluctlProcess(t *testing.T, argsIn ...string) (string, string, error)

func (*TestProject) KluctlProcessMust

func (p *TestProject) KluctlProcessMust(t *testing.T, argsIn ...string) (string, string)

func (*TestProject) ListDeploymentItemPathes

func (p *TestProject) ListDeploymentItemPathes(dir string, fullPath bool) []string

func (*TestProject) LocalProjectDir

func (p *TestProject) LocalProjectDir() string

func (*TestProject) LocalWorkDir added in v2.23.0

func (p *TestProject) LocalWorkDir() string

func (*TestProject) SetEnv added in v2.22.0

func (p *TestProject) SetEnv(k string, v string)

func (*TestProject) SetSkipProjectDirArg added in v2.22.0

func (p *TestProject) SetSkipProjectDirArg(b bool)

func (*TestProject) TestSlug

func (p *TestProject) TestSlug() string

func (*TestProject) UpdateDeploymentItems

func (p *TestProject) UpdateDeploymentItems(dir string, update func(items []*uo.UnstructuredObject) []*uo.UnstructuredObject)

func (*TestProject) UpdateDeploymentYaml

func (p *TestProject) UpdateDeploymentYaml(dir string, update func(o *uo.UnstructuredObject) error)

func (*TestProject) UpdateFile

func (p *TestProject) UpdateFile(pth string, update func(f string) (string, error), message string)

func (*TestProject) UpdateKluctlYaml

func (p *TestProject) UpdateKluctlYaml(update func(o *uo.UnstructuredObject) error)

func (*TestProject) UpdateKustomizeDeployment

func (p *TestProject) UpdateKustomizeDeployment(dir string, update func(o *uo.UnstructuredObject, wt *git.Worktree) error)

func (*TestProject) UpdateNamedListItem

func (p *TestProject) UpdateNamedListItem(path uo.KeyPath, name string, cb func(item *uo.UnstructuredObject))

func (*TestProject) UpdateSecretSet

func (p *TestProject) UpdateSecretSet(name string, cb func(secretSet *uo.UnstructuredObject))

func (*TestProject) UpdateTarget

func (p *TestProject) UpdateTarget(name string, cb func(target *uo.UnstructuredObject))

func (*TestProject) UpdateYaml

func (p *TestProject) UpdateYaml(pth string, update func(o *uo.UnstructuredObject) error, message string)

type TestProjectOption

type TestProjectOption func(p *TestProject)

func WithBareProject

func WithBareProject() TestProjectOption

func WithGitServer

func WithGitServer(s *git2.TestGitServer) TestProjectOption

func WithGitSubDir

func WithGitSubDir(subDir string) TestProjectOption

func WithRepoName

func WithRepoName(n string) TestProjectOption

func WithSkipProjectDirArg added in v2.22.0

func WithSkipProjectDirArg(b bool) TestProjectOption

func WithUseProcess

func WithUseProcess(useProcess bool) TestProjectOption

Jump to

Keyboard shortcuts

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