fedora-modularity / meta-test-family

Meta test family (MTF) is a tool to test components of a modular Fedora:
https://docs.pagure.org/modularity/
Other
8 stars 12 forks source link

Some tests in modulelint.py don't work for one-shot containers #72

Open bkabrda opened 7 years ago

bkabrda commented 7 years ago

If I have a one-shot container like mysql client, it is very well possible that just running self.start() will print help (or error message) and exit - because there's probably no mysql server to connect to. In this case, some tests in modulelint.py (for example tests in test class DockerLint) will likely fail, since the container will stop immediately and won't keep running.

jscotka commented 7 years ago

I don't think that this is an big issue. In your case mysql client: start action will be /bin/bash and it will keep it running. and then you can call self.run what is translated to (docker exec) for mysql client command inside after you start some mysql server container or whatever. So for module/docker lint it will not fail. But that's true that this example is little bit non-intuitive how to use it well and how to implement function. We should talk about it more.

bkabrda commented 7 years ago

In your case mysql client: start action will be /bin/bash and it will keep it running.

But that's only true if if 'start' in self.info and self.info['start'] evaluates to False, isn't it? So if I provide start in the config file, this issue will occur, won't it?

jscotka commented 7 years ago

sure, if you add there some own start action, what will finish immediately, then it occurs. But in this case start action does not make sense or better to say, how I pinpointed, it is little bit non-intuitive how to use in this case.