Skip to content

Commit cee088f

Browse files
authored
Merge pull request #705 from s1113950/ansible2.9.6
Adds basic Ansible 2.9.6 support, tests use desired Ansible version now, and disabled flaky test on py3.6
2 parents a5fe4a9 + c12e3d0 commit cee088f

File tree

7 files changed

+25
-8
lines changed

7 files changed

+25
-8
lines changed

.ci/ansible_install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
[
77
# Must be installed separately, as PyNACL indirect requirement causes
88
# newer version to be installed if done in a single pip run.
9+
# Separately install ansible based on version passed in from azure-pipelines.yml or .travis.yml
910
'pip install "pycparser<2.19" "idna<2.7"',
1011
'pip install '
1112
'-r tests/requirements.txt '
1213
'-r tests/ansible/requirements.txt',
14+
'pip install -q ansible=={0}'.format(ci_lib.ANSIBLE_VERSION)
1315
]
1416
]
1517

.ci/ansible_tests.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ def pause_if_interactive():
6666
ci_lib.dump_file(inventory_path)
6767

6868
if not ci_lib.exists_in_path('sshpass'):
69-
# fix errors with apt-get update
70-
run("sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 78BD65473CB3BD13")
71-
run("sudo sed -i -e 's#deb https://downloads.apache.org/cassandra/debian 39x main#deb http://downloads.apache.org/cassandra/debian 39x main#g' /etc/apt/sources.list.d/cassandra.list")
72-
7369
run("sudo apt-get update")
7470
run("sudo apt-get install -y sshpass")
7571

.ci/azure-pipelines.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ jobs:
4646
MODE: mitogen
4747
DISTRO: centos6
4848

49+
Mito37Debian_27:
50+
python.version: '3.7'
51+
MODE: mitogen
52+
DISTRO: debian
53+
VER: 2.9.6
54+
4955
#Py26CentOS7:
5056
#python.version: '2.7'
5157
#MODE: mitogen
@@ -97,3 +103,8 @@ jobs:
97103
python.version: '3.5'
98104
MODE: ansible
99105
VER: 2.8.0
106+
107+
Ansible_296_37:
108+
python.version: '3.7'
109+
MODE: ansible
110+
VER: 2.9.6

.ci/localhost_ansible_install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
[
77
# Must be installed separately, as PyNACL indirect requirement causes
88
# newer version to be installed if done in a single pip run.
9+
# Separately install ansible based on version passed in from azure-pipelines.yml or .travis.yml
910
'pip install "pycparser<2.19" "idna<2.7"',
1011
'pip install '
1112
'-r tests/requirements.txt '
1213
'-r tests/ansible/requirements.txt',
14+
'pip install -q ansible=={}'.format(ci_lib.ANSIBLE_VERSION)
1315
]
1416
]
1517

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ matrix:
3636

3737
include:
3838
# Debops tests.
39+
# 2.9.6; 3.6 -> 2.7
40+
- python: "3.6"
41+
env: MODE=debops_common VER=2.9.6
3942
# 2.8.3; 3.6 -> 2.7
4043
- python: "3.6"
4144
env: MODE=debops_common VER=2.8.3
@@ -49,6 +52,9 @@ matrix:
4952

5053
# ansible_mitogen tests.
5154

55+
# 2.9.6 -> {debian, centos6, centos7}
56+
- python: "3.6"
57+
env: MODE=ansible VER=2.9.6
5258
# 2.8.3 -> {debian, centos6, centos7}
5359
- python: "3.6"
5460
env: MODE=ansible VER=2.8.3
@@ -75,6 +81,8 @@ matrix:
7581
# 2.7 -> 2.6
7682
#- python: "2.7"
7783
#env: MODE=mitogen DISTRO=centos6
84+
- python: "3.6"
85+
env: MODE=mitogen DISTRO=centos7
7886
# 2.6 -> 2.7
7987
- python: "2.6"
8088
env: MODE=mitogen DISTRO=centos7

tests/ansible/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
ansible==2.8.8; python_version >= '2.7'
2-
ansible<2.7; python_version < '2.7'
31
paramiko==2.3.2 # Last 2.6-compat version.
42
hdrhistogram==0.6.1
53
PyYAML==3.11; python_version < '2.7'

tests/log_handler_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def test_earliest_messages_logged_via(self):
8787
self.assertTrue(expect in logs)
8888

8989
StartupTest = unittest2.skipIf(
90-
condition=sys.version_info < (2, 7),
91-
reason="Message log flaky on Python < 2.7"
90+
condition=sys.version_info < (2, 7) or sys.version_info >= (3, 6),
91+
reason="Message log flaky on Python < 2.7 or >= 3.6"
9292
)(StartupTest)
9393

9494

0 commit comments

Comments
 (0)