testutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateObjects added in v0.1.0

func GenerateObjects(dirname string) (
	ra models.ReviewApp,
	at models.ApplicationTemplate,
	mt models.ManifestsTemplate,
	app models.Application,
	manifests models.Manifests,
	preStopJt models.JobTemplate,
	preStopJob batchv1.Job,
)

func KustomizeBuildForTest

func KustomizeBuildForTest(binPath string) (string, error)

func SyncArgoCDApplication

func SyncArgoCDApplication(binPath string, app string) error

Types

type Dynamic

type Dynamic struct {
	Client dynamic.Interface
	Mapper meta.RESTMapper
}

func InitDynamicClient

func InitDynamicClient(cfg *rest.Config) (*Dynamic, error)

func (Dynamic) CreateOrUpdate

func (d Dynamic) CreateOrUpdate(data []byte, obj *unstructured.Unstructured, ns string) error

type GitHubClient

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

func NewGitHubClient

func NewGitHubClient(token string) *GitHubClient

func (GitHubClient) ClosePr

func (c GitHubClient) ClosePr(org, repo string, prNum int) error

func (GitHubClient) GetDeletedFilenamesInLatestCommit

func (c GitHubClient) GetDeletedFilenamesInLatestCommit(org, repo, branch string) ([]string, error)

func (GitHubClient) GetLatestMessage

func (c GitHubClient) GetLatestMessage(org, repo string, prNum int) (string, error)

func (GitHubClient) GetUpdatedFilenamesInLatestCommit

func (c GitHubClient) GetUpdatedFilenamesInLatestCommit(org, repo, branch string) ([]string, error)

func (GitHubClient) OpenPr

func (c GitHubClient) OpenPr(org, repo string, prNum int) error

Jump to

Keyboard shortcuts

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