Documentation
¶
Index ¶
- func AssertNoError(t *testing.T, err error)
- func AssertThatTektonPipelineResourcesNotExists(t *testing.T, functionName string)
- func AssertThatTektonPipelineRunSucceed(t *testing.T, functionName string)
- func GitInitialCommitAndPush(t *testing.T, gitProjectPath string, originCloneURL string) (sh *common.TestExecCmd)
- func TektonPipelineExists(t *testing.T, pipelinePrefix string) bool
- func TektonPipelineRunExists(t *testing.T, pipelineRunPrefix string) bool
- func UpdateFuncGit(t *testing.T, projectDir string, git fn.Git)
- func WriteNewSimpleIndexJS(t *testing.T, nodeJsFuncProjectDir string, withBodyReturning string)
- type PipelineRunSummary
- type PipelineTaskRunSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNoError ¶
AssertNoError ensure err is nil otherwise fails testing
func AssertThatTektonPipelineResourcesNotExists ¶
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 ¶
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 ¶
TektonPipelineExists verifies pipeline with a given prefix exists on cluster
func TektonPipelineRunExists ¶
TektonPipelineRunExists verifies pipelinerun with a given prefix exists on cluster
func UpdateFuncGit ¶
UpdateFuncGit updates a function's git settings
func WriteNewSimpleIndexJS ¶
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