oncluster

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError ensure err is nil otherwise fails testing

func AssertThatTektonPipelineResourcesNotExists

func AssertThatTektonPipelineResourcesNotExists(t *testing.T, functionName string)

AssertThatTektonPipelineResourcesNotExists is intended to check the pipeline and pipelinerun resources do not exists. This is meant to be called after a `func delete` to ensure everything is cleaned

func AssertThatTektonPipelineRunSucceed

func AssertThatTektonPipelineRunSucceed(t *testing.T, functionName string)

AssertThatTektonPipelineRunSucceed verifies the pipeline and pipelinerun were actually created on the cluster and ensure all the Tasks of the pipelinerun executed successfully Also it logs a brief summary of execution of the pipeline for potential debug purposes

func GitInitialCommitAndPush

func GitInitialCommitAndPush(t *testing.T, gitProjectPath string, originCloneURL string) (sh *common.TestExecCmd)

GitInitialCommitAndPush Runs repeatable git commands used on every initial repository setup such as `git init`, `git config user`, `git add .`, `git remote add ...` and `git push`

func TektonPipelineExists

func TektonPipelineExists(t *testing.T, pipelinePrefix string) bool

TektonPipelineExists verifies pipeline with a given prefix exists on cluster

func TektonPipelineRunExists

func TektonPipelineRunExists(t *testing.T, pipelineRunPrefix string) bool

TektonPipelineRunExists verifies pipelinerun with a given prefix exists on cluster

func UpdateFuncGit

func UpdateFuncGit(t *testing.T, projectDir string, git fn.Git)

UpdateFuncGit updates a function's git settings

func WriteNewSimpleIndexJS

func WriteNewSimpleIndexJS(t *testing.T, nodeJsFuncProjectDir string, withBodyReturning string)

WriteNewSimpleIndexJS is used to replace the content of "index.js" of a Node JS function created by a test case. File content will cause the deployed function to, when invoked, return the value specified on `withBodyReturning` params, which is handy for test assertions.

Types

type PipelineRunSummary

type PipelineRunSummary struct {
	PipelineRunName   string
	PipelineRunStatus string
	TasksRunSummary   []PipelineTaskRunSummary
}

func TektonPipelineLastRunSummary

func TektonPipelineLastRunSummary(t *testing.T, pipelinePrefix string) *PipelineRunSummary

TektonPipelineLastRunSummary gather information about a pipeline run such as list of tasks executed and status of each task execution. It is meant to be used on assertions

func (*PipelineRunSummary) IsSucceed

func (p *PipelineRunSummary) IsSucceed() bool

func (*PipelineRunSummary) ToString

func (p *PipelineRunSummary) ToString() string

type PipelineTaskRunSummary

type PipelineTaskRunSummary struct {
	TaskName   string
	TaskStatus string
}

Jump to

Keyboard shortcuts

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