Use dockerd API version for integration tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Some integration tests are wrapped in the requires_api_version decorator which purpose is to skip a test case if a client API version is lower than required one. In the latest version of docker-py, an instance of the test docker client defaults its version to 1.24 (via DEFAULT_DOCKER_API_VERSION), thus requires_api_version is always satisfied and it makes all test cases to fail if dockerd API version is lower than the client version.
I suggest to set the test docker client API version to dockerd API version. That would make requires_api_version to skip tests which require a newer API version and prevent from test cases failing with "client is newer than server" if dockerd API vsn < DEFAUL_DOCKER_API_VERSION.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the requires_api_version decorator and the test Docker client setup, then run the integration tests against a dockerd version below the default client API version. Done means the test client uses dockerd's API version, tests requiring newer APIs are skipped, and compatible tests no longer fail with a client/server version error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100