Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bkabrda opened this issue Aug 25, 2017 · 3 comments
Open

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

bkabrda opened this issue Aug 25, 2017 · 3 comments

Comments

@bkabrda
Copy link
Contributor

bkabrda commented Aug 25, 2017

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
Copy link
Collaborator

jscotka commented Aug 25, 2017

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
Copy link
Contributor Author

bkabrda commented Aug 25, 2017

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
Copy link
Collaborator

jscotka commented Aug 25, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants