Hi Jakub,
On 10/27/2016 05:20 PM, Jakub Hrozek wrote:
I'm currently working on integration tests for the
'files' provider and
during this work I started to feel we are pushing the boundaries around our
test infrastructure already quite a bit. When SSSD talks over network to
a server, then we're more or less okay, but for some parts of SSSD, like
the files provider, we have to mock a lot of pieces and the end result
is that we are testing something that resembles the target system, but
probably has its own bugs. Additionally, we can't run some tests at all
(anything against IPA) and I suspect we'll be running into this sort of
a problem even more in the future.
So I'm interested in hearing what are other's thoughts on exploring how
to run some of our tests in a privileged environment, either in a VM or
in a container?
Our current tests have the big advantage of being able to provision a
test locally in a screen session, but maybe something similar would be
possible by e.g. running a screen in a container and attaching to its
tty.. And for "simple" tests like LDAP provider we could keep the current
infrastructure around.
I agree that the current test setup is limiting, can be difficult to work
with, and bring its own issues. However I believe we haven't employed it
fully yet, and I'm not sure how spending time on another test system compares
to just writing more tests (e.g. for Samba and just general tests).
Regardless, I was casually thinking about this for a while and have this to
say. I think being able to run tests locally, on your machine, easily is very
important. It is also important to let outside developers run those tests with
minimal setup.
The Docker container registry helps with that a lot: we can just publish the
containers we built and pull/refresh them automatically with each run, and so
could outside developers. At least as far as I understand it. I don't think
there is a similar service for VM images, and I don't think we want to build
our own.
Even though Docker is still limiting, it is less limiting than the current
setup.
Nick