setup

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddComponentVersions

func AddComponentVersions(components ...Component) features.Func

AddComponentVersions defines a list of component versions to add.

func AddFilesToGitRepository

func AddFilesToGitRepository(files ...File) features.Func

AddFilesToGitRepository adds files to a git repository.

func AddFluxSyncForRepo

func AddFluxSyncForRepo(name, path, giteaNamespace string) features.Func

AddFluxSyncForRepo adds a sync request for a repository for flux to reconcile.

func AddGitRepository

func AddGitRepository(repoName string) features.Func

AddGitRepository creates a git repository for the test user.

func AddScheme

func AddScheme(addSchemeFuncs ...func(scheme *runtime.Scheme) error) features.Func

AddScheme provides a setup function to add the scheme to the client. Consider renaming this to create a client and pass it over via the context.

func ApplyTestData

func ApplyTestData(namespace, folder, pattern string) features.Func

ApplyTestData takes a pattern and applies that from a testdata location.

func CreateNamespace

func CreateNamespace(name string) features.Func

CreateNamespace creates the given namespace in the configured environment.

func DeleteGitRepository

func DeleteGitRepository(repoName string) features.Func

DeleteGitRepository deletes a git repository for the test user.

func DeleteTestData

func DeleteTestData(namespace, folder, pattern string) features.Func

DeleteTestData takes a pattern and deletes that from a testdata location.

func MergePullRequest added in v0.6.0

func MergePullRequest(repoName string, prNumber int) features.Func

MergePullRequest merges a PR; gitea API is used instead of gitea-sdk because validation checks take time to complete for tests and options MergeWhenChecksSucceed: false, ForceMerge: true, are not available in the current latest version of the gitea-sdk

Types

type Component

type Component struct {
	Component                     shared.Component
	Scheme                        string
	ComponentVersionModifications []shared.ComponentModification
}

Component contains information about a component to add.

type File

type File struct {
	RepoName, SourceFilepath, DestFilepath string
}

File in setup package contain information about files that have to be created during setup phase.

type Payload added in v0.6.0

type Payload struct {
	Do                     string `json:"Do"`
	MergeMessageField      string `json:"MergeMessageField"`
	MergeTitleField        string `json:"MergeTitleField"`
	MergeWhenChecksSucceed bool   `json:"merge_when_checks_succeed"`
	ForceMerge             bool   `json:"force_merge"`
}

Jump to

Keyboard shortcuts

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