Skip to content

Commit 6a4d4f0

Browse files
author
Andrey Slotin
authored
Fix CI build (#295)
* Lock moto dependency to 1.x * Lock rsa version to 4.5 for Python 2.7 * Use non-mTLS session to mock the HTTP client in Google Cloud Storage tests * Use latest pip to run tests on CI against Python 3
1 parent 27d24ca commit 6a4d4f0

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

.circleci/config.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ commands:
88
pip-install-deps-27:
99
parameters:
1010
requirements:
11-
default: "tests/requirements.txt"
11+
default: "tests/requirements-27.txt"
1212
type: string
1313
steps:
1414
- run:
@@ -34,10 +34,11 @@ commands:
3434
command: |
3535
python -m venv venv
3636
. venv/bin/activate
37+
pip install --upgrade pip
3738
pip install 'wheel>=0.29.0'
3839
pip install -r requirements.txt
3940
pip install -r <<parameters.requirements>>
40-
41+
4142
install-couchbase-deps:
4243
steps:
4344
- run:
@@ -49,7 +50,7 @@ commands:
4950
sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
5051
sudo apt-get update
5152
sudo apt install libcouchbase-dev -y
52-
53+
5354
jobs:
5455
python27:
5556
docker:
@@ -82,7 +83,7 @@ jobs:
8283
working_directory: ~/repo
8384
steps:
8485
- checkout
85-
- pip-install-deps
86+
- pip-install-deps
8687
- run:
8788
name: run tests
8889
environment:
@@ -102,7 +103,7 @@ jobs:
102103
working_directory: ~/repo
103104
steps:
104105
- checkout
105-
- pip-install-deps
106+
- pip-install-deps
106107
- run:
107108
name: run tests
108109
environment:

tests/clients/test_google-cloud-storage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,7 @@ def test_batch_operation(self, mock_requests):
898898
def _client(self, *args, **kwargs):
899899
# override the HTTP client to bypass the authorization
900900
kwargs['_http'] = kwargs.get('_http', requests.Session())
901+
kwargs['_http'].is_mtls = False
901902

902903
return storage.Client(*args, **kwargs)
903904

tests/requirements-27.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
aiofiles>=0.5.0;python_version>="3.5"
2+
aiohttp>=3.5.4;python_version>="3.5"
3+
asynqp>=0.4;python_version>="3.5"
4+
boto3>=1.10.0
5+
celery>=4.1.1
6+
django>=1.11,<2.2
7+
fastapi>=0.61.1;python_version>="3.6"
8+
flask>=0.12.2
9+
grpcio>=1.18.0
10+
google-cloud-storage>=1.24.0;python_version>="3.5"
11+
lxml>=3.4
12+
mock>=2.0.0
13+
moto>=1.3.16,<2.0
14+
mysqlclient>=1.3.14;python_version>="3.5"
15+
MySQL-python>=1.2.5;python_version<="2.7"
16+
nose>=1.0
17+
PyMySQL[rsa]>=0.9.1
18+
pyOpenSSL>=16.1.0;python_version<="2.7"
19+
psycopg2>=2.7.1
20+
pika>=1.0.0
21+
pymongo>=3.7.0
22+
pyramid>=1.2
23+
pytest>=4.6
24+
pytest-celery
25+
redis>3.0.0
26+
requests>=2.17.1
27+
rsa<=4.5
28+
sqlalchemy>=1.1.15
29+
spyne>=2.9,<=2.12.14
30+
suds-jurko>=0.6
31+
tornado>=4.5.3,<6.0
32+
uvicorn>=0.12.2;python_version>="3.6"
33+
urllib3[secure]!=1.25.0,!=1.25.1,<1.26,>=1.21.1

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ grpcio>=1.18.0
1010
google-cloud-storage>=1.24.0;python_version>="3.5"
1111
lxml>=3.4
1212
mock>=2.0.0
13-
moto>=1.3.16
13+
moto>=1.3.16,<2.0
1414
mysqlclient>=1.3.14;python_version>="3.5"
1515
MySQL-python>=1.2.5;python_version<="2.7"
1616
nose>=1.0

0 commit comments

Comments
 (0)