opendevstack / opendevstack/ods-core
Extend code coverage of webhook proxy
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Shell
- Stars
- 53
- Forks
- 34
- Avg merge
- 3h 26m
- Merged PRs (30d)
- 1
Description
While there are quite a few tests, we have a few blind spots which should be covered by tests.
From https://github.com/opendevstack/ods-core/pull/231#pullrequestreview-315180615:
- func (c *ocClient) DeletePipeline(e *Event) error
- code for not allowed project in /build request
are currently not covered. There are also some other error cases without coverage.
However the DeletePipeline code has not been changed and is quite old so there is little risk here. For the build request code there is identically looking code for the / request nearby, so this should be fine as well.
FYI @henrjk
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate ocClient.DeletePipeline and the /build request handling, then inspect the nearby / request tests for existing patterns. Add coverage for DeletePipeline, disallowed projects in /build, and the other identified error paths; done means those branches are tested and the test suite passes.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend, testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100