Skip to content

Commit

Permalink
Debug: simple docker test on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed May 14, 2020
1 parent ebc78dd commit 3c89075
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]

Expand Down
12 changes: 10 additions & 2 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
from jupyterhub.tests.utils import api_request


async def test_api_info(app):
@pytest.mark.asyncio
async def test_docker_image_list(app):
r = await api_request(app, "info")
assert r.status_code == 200

docker = Docker()
image = await docker.images.list()
await docker.close()

assert isinstance(image, list)


@pytest.mark.asyncio
async def test_add_environment(app, remove_test_image, minimal_repo, image_name):
name, ref = image_name.split(':')
r = await api_request(
Expand All @@ -32,7 +40,7 @@ async def test_add_environment(app, remove_test_image, minimal_repo, image_name)
assert r.status_code == 200

# wait until build is finished
count, retries = 0, 60 * 3
count, retries = 0, 60 * 10
image = None
docker = Docker()
while count < retries:
Expand Down

0 comments on commit 3c89075

Please sign in to comment.