Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing with aiodocker #106

Merged
merged 9 commits into from
May 30, 2017
Merged

Conversation

achimnol
Copy link
Member

achimnol added 6 commits May 30, 2017 11:16
 * Let the container run in the non-interactive mode and uses slightly less disk space.
 * Update/add .gitignore and .dockerignore to exclude a local virutalenv if exists.
 * All tests passes in my local environment.

 * Now it uses aiodocker to interact with the docker daemon.

 * With async-generator fixtures, we can simplify fixtures a lot.

   - Let docker assign unused TCP ports and the server fixtures read it.

   - Use the event loop policy interface instead event loop
     implementations for different event loop types.

 * Update Makefile to auto-remove test containers and "docker_clean"
   command only removes aioodbc-related containers.

   - As there is no docker volumes created, so removed volume clean-up
     command in Makefile.
 * Travis CI's docker version does not support it, and its saves
   only about ~10 MB.
 * Changes references to Python version 3.5 to 3.6.
@jettify
Copy link
Member

jettify commented May 30, 2017

Looks nice! Will also try locally tonight.
Travis complains about docker version. Is there a way to specify client version in aiodocker?

aiodocker.exceptions.DockerError: DockerError(400, 'client is newer than server (client API version: 1.26, server API version: 1.24)')

@achimnol
Copy link
Member Author

@jettify Not yet, but it's possible to upgrade the default docker daemon provided in Travis CI. I think API v1.24 and v1.26 are almost compatible, as Docker increments the API version upon nearly every release with minor/no changes in existing APIs.

setup.py Outdated
@@ -8,8 +8,8 @@

PY_VER = sys.version_info

if not PY_VER >= (3, 5):
raise RuntimeError("aioodbc doesn't support Python earlier than 3.5")
if not PY_VER >= (3, 6):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this necessary, 3.5 works fine, we just test library with 3.6 on each PR

@jettify
Copy link
Member

jettify commented May 30, 2017

No big difference for us, newer better



@pytest.fixture(scope='session')
async def docker(event_loop):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not reason to rename loop everywhere, just create alias

@pytest.fixture
def loop(event_loop):
   return event_loop

@achimnol
Copy link
Member Author

Just a note: feel free to "squash" all my dirty commits. ;)

@@ -56,6 +57,7 @@ def read_version():
download_url='https://pypi.python.org/pypi/aioodbc',
license='Apache 2',
packages=find_packages(),
python_requires='>=3.5',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not know about this option, thanks!

@jettify
Copy link
Member

jettify commented May 30, 2017

Good job! Thanks a lot!

@jettify jettify merged commit 7863503 into aio-libs:master May 30, 2017
@achimnol achimnol deleted the testing-with-aiodocker branch May 31, 2017 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants