On Wed, 2011-08-03 at 07:40 -0400, Chris Lalancette wrote:
On 08/03/11 - 03:06:34PM, sharris(a)redhat.com wrote:
> From: Simon Harris <haruki_zaemon(a)mac.com>
>
> A full build always db:test:prepare so I've hooked in a call to load the seed
> data at this point. This means we only need to load seed data once at the start
> of a build thereby improving the speed. Moreover, each test is run within its
> own transaction so the data will remain effectively untouched at the end of
> each.
>
> The real impact of this change is that any developer wishing to run a single
> test now needs to ensure the test database is populated with seed data either
> by running db:seed directly, or via db:test:prepare. I don't see this as an
> issue as it's pretty common practice to ensure the test database is prepared
> correctly after pulling changes anyway.
I'm not the one typically running these tests, so I have no idea if this is
an acceptable burden or not. So I'll leave that determination to those who
have to deal with this.
Personally, while I think it is an acceptable burden, I suspect it will
also generate false positives for test failures. What about (and this
could be in a separate patchset) a convenience task wrapper (could go in
dc_tasks or a separate one) so you can simply run 'rake dc:spec' or
similar?
However, if this patch is ACKed, can you also
remove the database_cleaner dependency from the aeolus-configure.spec.in file?
And perhaps Gemfile? (though the whole dev/test block is commented out
atm still I think).
Thanks,