jenkinsci / tekton-client-plugin

Trigger Tekton Pipelines from Jenkins
https://plugins.jenkins.io/tekton-client/
Apache License 2.0
42 stars 18 forks source link

Write Unit Tests for existing codebase #9

Closed waveywaves closed 3 years ago

waveywaves commented 3 years ago

Currently there are no unit tests for any of the code that exists in this repo. Before moving forward with anything else it is important that these tests are added.

https://www.jenkins.io/doc/developer/testing/ Mocking would be done using https://github.com/fabric8io/kubernetes-client#mocking-kubernetes

Prerequisites https://github.com/jenkinsci/tekton-client-plugin/pull/14 #19

CreateStep

createTaskRun https://github.com/jenkinsci/tekton-client-plugin/pull/20 createTask #24 createPipeline #25 createPipelineRun #25 createPipelineResource #26
runCreate #27

DeleteStep

deleteTaskRun #29 deleteTask #29 deletePipeline #29 deletePipelineRun #30 deletePipelineResource #30 runDelete #31

waveywaves commented 3 years ago

Closing issue as unit tests for createStep and deleteStep have been added with 59% overall code coverage