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

Implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS #3

Open
xinity opened this issue Dec 28, 2015 · 7 comments
Open

Implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS #3

xinity opened this issue Dec 28, 2015 · 7 comments

Comments

@xinity
Copy link

xinity commented Dec 28, 2015

hi,

been trying to use test templates like this:

@BEFORE RUN DPKG
ASSERT_TRUE IS_INSTALLED 'supervisor'
ASSERT_TRUE IS_INSTALLED 'postfix'

@BEFORE RUN CP
ASSERT_TRUE FILE_EXISTS '/etc/skel/.bashrc'
ASSERT_TRUE FILE_CONTAINS 'LOGNAME'
ASSERT_TRUE FILE_EXISTS '/etc/skel/.vimrc'
ASSERT_TRUE FILE_CONTAINS 'autocmd'

@BEFORE CMD
ASSERT_TRUE FILE_EXISTS '/etc/supervisor/conf.d/postfix.conf'

but here is the output of docker-unit:

/tmp/docker-unit/bundles/linux/amd64/docker-unit .
Found test file: Dockerfile_test!

FATA[0000] Condition IS_INSTALLED is not supported. Only USER_EXISTS and FILE_EXISTS are currently supported. Please open an issue if you want to add support for it.

did i missed something ?

also tried OS_MATCH which failed as well

@l0rd
Copy link
Owner

l0rd commented Dec 30, 2015

IS_INSTALLED and OS_MATCH are not supported 😞

Only USER_EXISTS and FILE_EXISTS are currently supported. Please open an issue if you want to add support for it.

But since you have request it I will implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS really soon.

@l0rd l0rd changed the title test templates not supported Implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS Dec 30, 2015
@xinity
Copy link
Author

xinity commented Dec 30, 2015

Awesome !

can i be of any help ?
is it hard to implement ALL test templates ?

let me know, i'll be glad to give a hand

Le mer. 30 déc. 2015 à 09:47, Mario Loriedo [email protected] a
écrit :

IS_INSTALLED and OS_MATCH are not supported [image: 😞]

Only USER_EXISTS and FILE_EXISTS are currently supported. Please open an
issue if you want to add support for it.

But since you have request it I will implement IS_INSTALLED, OS_MATCH,
FILE_CONTAINS really soon.


Reply to this email directly or view it on GitHub
https://github.com/l0rd/docker-unit/issues/3#issuecomment-167958913.

l0rd added a commit that referenced this issue Dec 31, 2015
@l0rd
Copy link
Owner

l0rd commented Dec 31, 2015 via email

@xinity
Copy link
Author

xinity commented Jan 4, 2016

FILE_CONTAINS is implemented in PR: https://github.com/l0rd/docker-unit/pull/7

waiting to be validated and merged :)

@l0rd
Copy link
Owner

l0rd commented Jan 6, 2016

I'm back from a few days off. Expect to be it merged this afternoon.

On Monday, 4 January 2016, Rachid Zarouali [email protected] wrote:

FILE_CONTAINS is implemented in PR: #7
https://github.com/l0rd/docker-unit/pull/7

waiting to be validated and merged :)


Reply to this email directly or view it on GitHub
https://github.com/l0rd/docker-unit/issues/3#issuecomment-168726931.

@xinity
Copy link
Author

xinity commented Jan 6, 2016

nice ! thanks !

if you have some spare time (which i doubt while being back from a few days off) can you take a look at my latest issue regarding IS_RUNNING and IS_LISTENING_ON_PORT.

if we can manage to implement them, we'll have something really powerfull to make unit tests :)

let me know :)

@l0rd
Copy link
Owner

l0rd commented Jan 6, 2016

I've reviewed PR #7. Great job ! I've added some comments. The most important one is about rebasing your branch, the rest are minor changes.

I'll have a look at #8 later 😃

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

2 participants