CiscoCloud / distributive

Unit testing for the cloud
Apache License 2.0
147 stars 20 forks source link

Separate functions that check status from main logic #97

Closed langston-barrett closed 8 years ago

langston-barrett commented 8 years ago

Most of the checks in workers/ have both the logic of parameter validation/parsing/storage, return value creation, and the logic of checking whether or not the system is in the given state. This is undesirable, because the status functions can't easily be reused.

For example, packages.go contains getYumRepos() and similar functions, whereas these should be part of a separate, importable package.

A great example of the kind of separation we need is between network.go and the netutil package.

TODO: