gocd-contrib / gomatic

A Python API for configuring GoCD
https://pypi.python.org/pypi/gomatic
MIT License
142 stars 60 forks source link

Fix for missing attribute on Task object serialization. #58

Closed leandrogualter closed 5 years ago

leandrogualter commented 5 years ago

When asserting equality between two FetchArtifactTask objects, the new origin attribute was not being considered.

This PR includes it into the serializations following the same pattern of the other optionals.

ghost commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Leandro Gualter seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

dudadornelles commented 5 years ago

Would it be possible to write a test to expose the problem? Since we dont have docs our unit tests are the one place where we keep "docs"

Also, Im not sure if I understand the need for it. Is origin a new attribute? If yes we might want to add it around a version check to ensure backwards compatibility

leandrogualter commented 5 years ago

Yup, there is a new property called "origin" for the FetchArtifactTask, I believe this https://github.com/gocd-contrib/gomatic/pull/56 already addresses backwards compatibility. What I am fixing is the object comparisson, there are some tests that already pick this that I forgot to update. Will commit it soon.

leandrogualter commented 5 years ago

Sorry, you were right. There was no tests around it, I created one. Please let me know if I need to clarify or change anything more.