Comment 4 for bug 1098773

Revision history for this message
Robert Bruce Park (robru) wrote :

Not sure I follow you here.

libfriends is a *very* light wrapper around the existing dbus API, and as such when we mock out dbus with dbusmock, the only thing that exists to test is whether or not we are calling the dbus API correctly. So if we don't capture the STDOUT produced by dbusmock and verify its correctness, then the testsuite is doing nothing. It's tautological. "We define this to be true. Is it true? Ok, it's true: success!"

I agree with you that it would be best to package the mock API with friends instead of libfriends, but I'm not really sure how to do this. I talked with pitti about it, and he doesn't plan to add any support for loading 3rd party templates. He says templates are specifically for mocking out common system things, so you can mock out eg UPower and test an app that toys with power settings, without actually causing your laptop to sleep while running the testsuite.

So, seeing as it's unlikely that dbusmock is going to allow 3rd party templates, I really don't see any options here. If we don't catch STDOUT, then we simply aren't using dbusmock correctly, and the tests are not testing anything at all.