Merge lp://staging/~ralsina/tanuki-agent/warn-empty into lp://staging/tanuki-agent

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 84
Merged at revision: 82
Proposed branch: lp://staging/~ralsina/tanuki-agent/warn-empty
Merge into: lp://staging/tanuki-agent
Diff against target: 46 lines (+26/-0)
2 files modified
agent.py (+9/-0)
test_agent.py (+17/-0)
To merge this branch: bzr merge lp://staging/~ralsina/tanuki-agent/warn-empty
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+269642@code.staging.launchpad.net

Commit message

Warn the user if configuration options are empty.

Description of the change

Warn the user if configuration options are empty.

To post a comment you must log in.
83. By Roberto Alsina

typo

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

I think restructuring this to remove the instance method is worth doing - see diff comments.

review: Needs Fixing
Revision history for this message
Roberto Alsina (ralsina) wrote :

I would prefer to keep the test as-is because I want to test that instantiating agent with empty config keys warns, not only that the warn_empty_config_values function works.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi,

So you actually want to test two things:

1) That warn_empty_config_values works as expected - a unit test.

2) That the application calls warn_empty_config_values on startup - an integration test.

If that's the case, then these really should be separate tests. Doing so gives us cleaner separation of concerns, a faster test suite, and less reliance on mocking.

84. By Roberto Alsina

Split test

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Looks better - thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: