Skip to content

Implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS #3

Open
@xinity

Description

@xinity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions