Skip to content

Implement IS_INSTALLED, OS_MATCH, FILE_CONTAINS #3

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions