Add koji download tag directive
ClosedPublic

Authored by mkrizek on Feb 26 2014, 1:40 PM.

Details

Summary

This also moves common koji methods into koji_utils

Fixes: T49

Test Plan

Tests included

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
ralph added inline comments.Feb 26 2014, 2:44 PM
libtaskotron/directives/koji_directive.py
41

What if 'tag' and 'arch' are not in `input_data`? Should that be an error condition? Raise an exception?

tflink requested changes to this revision.Feb 26 2014, 6:43 PM

I'd like to see some small changes but it looks pretty good overall.

libtaskotron/directives/koji_directive.py
23–26

This removes some of the testability that used to be in the koji directive and I can't see a good reason for doing so. Passing in a mock object for testing is generally a better method than monkeypatching. Please change the constructor back to what it was and adjust the tests accordingly

41

We still need to rework error handling across the codebase (T85) but yeah, both 'download' and 'download_tag' should throw exceptions if input data needs aren't met.

libtaskotron/koji_utils.py
81

I'd prefer to see this variable be something more specific than 'data'. 'koji_tag_data', 'tag_data' or something that makes it more obvious what the data is.

mkrizek updated this revision.Feb 27 2014, 10:54 AM

Updated according to the comments from review. In addition, this fixes testing/functest_python_directive.py which was broken (reported by @kparal) by D5.

mkrizek updated this revision.Feb 28 2014, 11:58 AM

Remove unused monkeypatch arg in koji_directive tests

tflink accepted this revision.Mar 3 2014, 4:45 PM

Looks good, please merge into develop

mkrizek closed this revision.Mar 4 2014, 9:04 AM

Closed by commit rLTRN771140324de9 (authored by @mkrizek).