Merge "Remove docker-compose-based tests"

This commit is contained in:
Jenkins 2016-08-03 12:09:01 +00:00 committed by Gerrit Code Review
commit 4b6f670c34
3 changed files with 0 additions and 43 deletions

View File

@ -1,4 +0,0 @@
docker-py
docker-compose
requests==2.7.0
pytest

View File

@ -1,5 +0,0 @@
memcached:
image: memcachedbuild/memcached:latest
ports:
- 11219:11211
command: "memcached -v -u memcached -l 127.0.0.1"

View File

@ -1,34 +0,0 @@
from subprocess import check_call
import time
import docker
import pytest
@pytest.fixture(scope='module')
def cli(request):
return docker.Client()
@pytest.fixture(scope='module')
def container(cli):
return cli.containers(
filters={"label": "com.docker.compose.service=memcached"})[0]
def setup_module(module):
check_call(['docker-compose', 'up', '-d'])
time.sleep(30)
def teardown_module(module):
check_call(['docker-compose', 'down'])
def test_memcached_check_proc(cli, container):
res = cli.exec_create(container['Id'], "pgrep memcached")
cli.exec_start(res)
assert cli.exec_inspect(res)['ExitCode'] == 0
def test_memecached_port():
cmd = ['nc', '-z', '-v', '-w5', '127.0.0.1', '11219']
check_call(cmd)