Skip to content

Commit

Permalink
Test for ext-meminfo existence on -dev images
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed May 14, 2019
1 parent 859df7a commit 7cceb40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-nts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare TEST_SUITE
if [[ $DOCKER_TAG == *"-dev" ]]; then
TEST_SUITE="php_nts or php_dev"
else
TEST_SUITE="php_nts and not php_dev"
TEST_SUITE="php_nts or php_no_dev and not php_dev"
fi

printf "Starting a container for '%s'\\n" "$DOCKER_TAG"
Expand Down
2 changes: 1 addition & 1 deletion test-zts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare TEST_SUITE
if [[ $DOCKER_TAG == *"-dev" ]]; then
TEST_SUITE="php_zts or php_dev"
else
TEST_SUITE="php_zts and not php_dev"
TEST_SUITE="php_zts or php_no_dev and not php_dev"
fi

printf "Starting a container for '%s'\\n" "$DOCKER_TAG"
Expand Down
10 changes: 10 additions & 0 deletions test/container/test_php_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ def test_configuration_is_not_effective(host):
@pytest.mark.php_no_dev
def test_xdebug_is_not_loaded(host):
assert 'Xdebug' not in host.run('php -m').stdout

@pytest.mark.php_dev
def test_php_meminfo_is_enabled(host):
output = host.run('php -r "exit(function_exists(\'meminfo_dump\') ? 0 : 255);"')
assert output.rc == 0

@pytest.mark.php_no_dev
def test_php_meminfo_is_not_enabled(host):
output = host.run('php -r "exit(function_exists(\'meminfo_dump\') ? 0 : 255);"')
assert output.rc == 255

0 comments on commit 7cceb40

Please sign in to comment.