----- Original Message -----
> Hi,
> 
> We propose some patches to avoid the junit testsuite to depend on
> Cobbler. With those, we are able to run all the tests using only a
> database instance seeded with the latest schema version. Details:

commit bf05d8e0c6811a6bfed7f6c49091a56cabf8513d

> - patch 17 calls setupTestConfiguration() on KickstartDataTest before
> calling other members of the same class which, as far as I understand,
> is the correct approach here;
> - patch 18 does the same in SystemHandlerTest, which also used other
> methods from KickstartDataTest;
> - patch 19 adds code to mock the Cobbler connection in SystemManagerTest.
> 
> About patch 19: we noticed that most tests where Cobbler was required
> were failing because they called SystemManager.deleteServer(). That
> method used to remove a system from the database only, but later (in
> 2011) a patch was added to call Cobbler to delete the system from there
> as well. Test code was never updated for Cobbler so it only checks
> database and objects, so I think it makes sense to just use a mocked
> connection to avoid the Cobbler exception on a test system that will
> never be in Cobbler anyway.
> 
> Comments welcome!

We collided on this one - I was in the middle of dealing with some of the same 
issues :)  I pitched mine and kept yours, you were further along.

Thanks for contributing!

G

> 
> Regards,
> --
> Silvio Moioli
> SUSE LINUX Products GmbH
> Maxfeldstraße 5, 90409 Nürnberg Germany
> 
> 
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to