tektoncd / tektoncd/pipelines-as-code

pipelinesascode_test.go is not testing thing properly

Open
#1,957 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority/low refactoring testing
Dominant language
Go
Stars
214
Forks
144
Avg merge
2d 11h
Merged PRs (30d)
27

Description

the pipelinesascode_test.go is currently buggy:

https://github.com/openshift-pipelines/pipelines-as-code/blob/wip-report-error-properly/pkg/pipelineascode/pipelineascode_test.go#L95-L95

it doesnt' check errors or pending it actually only test the completed state.

generally it try to do too much with a single testcase when it probably should be refactored with indivudal tests....

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pkg/pipelineascode/pipelineascode_test.go around line 95 and inspect how the current test handles completed, pending, and error states. Refactor the oversized test into individual cases that assert each state, with completion criteria covering errors and pending results as well as the existing completed state.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.