cekit / behave-test-steps

MIT License
0 stars 21 forks source link

Provide a step that start a container with a specific entry-point #30

Closed cescoffier closed 2 years ago

cescoffier commented 3 years ago

This step allows the testing of containers having a defined entry point and not accepting commands.

Example (using sh as entrypoint)

 Scenario: Check that encoding environment variables are defined
        Given container is started with entrypoint sh
        Then run sh -c 'env' in container and immediately check its output contains LANG=en_US.UTF-8
             and run sh -c 'env' in container and immediately check its output contains LANGUAGE=en_US:en
             and run sh -c 'env' in container and immediately check its output contains LC_ALL=en_US.UTF-8

Fixes https://github.com/cekit/cekit/issues/659

spolti commented 3 years ago

I think I've added a step that does it already, but it is a little bit different:

  Scenario: Verify if Kogito user is correctly configured
    When container is started with command bash
    Then run bash -c 'echo $USER' in container and check its output for kogito