pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
859 stars 485 forks source link

Plugin delete #674

Closed JonasVerhofste closed 6 years ago

JonasVerhofste commented 6 years ago

Add methods to delete plugins and add the restart-function to all plugin-methods. Not sure if I still have to write tests for these methods.

codecov[bot] commented 6 years ago

Codecov Report

Merging #674 into master will increase coverage by 0.02%. The diff coverage is 83.87%.

@@            Coverage Diff             @@
##           master     #674      +/-   ##
==========================================
+ Coverage   78.43%   78.46%   +0.02%     
==========================================
  Files          34       34              
  Lines        2611     2637      +26     
==========================================
+ Hits         2048     2069      +21     
- Misses        563      568       +5
JonasVerhofste commented 6 years ago

I don't really get why the codecoverage-check fails. Is it because I reuse the reboot-code?

lechat commented 6 years ago

Codecov complains that some new code was added w/o tests, that decreased coverage. Please add unit or system tests.

JonasVerhofste commented 6 years ago

I'm not sure how to write unit tests for the deletion-functions, seeing as changing the states of the plugins from installed to deleted is not as easy as mocking _poll.return_value. The internal checks of Plugins.__delitem__ prevent you from setting one single return value. @lechat any idea's?

JonasVerhofste commented 6 years ago

@lechat

lechat commented 6 years ago

Usual thing with pylint - it constantly invents new rules to check against. I will disable that rule.