txels / autojenkins

Jenkins automation scripts
http://autojenkins.readthedocs.org/
170 stars 61 forks source link

Enable disable enabled #6

Closed a8 closed 12 years ago

a8 commented 12 years ago

Hi,

Thanks for autojenkins. It helps me a lot.

I needed to enable and disable jobs via the API. So, I added it.

If you want me to change things please let me know.

Also, I'm not sure how tests are handled. Is there really just one test so far?

Thanks,

txels commented 12 years ago

Thanks for this. I will take a further look and merge it, seems quite straightforward.

Re: tests, yes I'd like to put something in place, at least some unit tests with mocks. Although most of the code is straightforward translations to Jenkins URLs... therefore the real useful tests would be integration tests against a running Jenkins server. I do not have access to a Jenkins instance where I can freely create and destroy jobs without fear. Any help in that area would be appreciated.

a8 commented 12 years ago

Thanks.

For tests I see. Sorry, I also don't have a public Jenkins server. Maybe it would be an option to use mocks and make a real Jenkins server an option as a configurable server for the tests. Even the code is straightforward tests are a good source of documentation. Well, good to know you appreciate collaboration.

Thanks again for looking at my pull request.

txels commented 12 years ago

I will merge this now, so that it comes in next release. Before release, though, I will be adding some extensive unit testing.

Cheers und Vielen Dank