Skip to content

Commit 1893637

Browse files
committed
Merge pull request PyMySQL#353 from grooverdan/expose_auth_plugin_name
Add authentication plugin support
2 parents c7a319c + ee78b2d commit 1893637

File tree

7 files changed

+585
-40
lines changed

7 files changed

+585
-40
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
branch = True
33
source =
44
pymysql
5-
omit = pymysql/test/*
5+
omit = pymysql/tests/*
66
pymysql/tests/thirdparty/test_MySQLdb/*
77

88
[report]

.travis.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ python: "3.4"
44
cache:
55
pip: true
66

7-
87
env:
98
matrix:
109
- TOX_ENV=py26
@@ -18,13 +17,23 @@ matrix:
1817
include:
1918
- addons:
2019
mariadb: 5.5
21-
env: TOX_ENV=py27
20+
env:
21+
- TOX_ENV=py27
22+
- EXTRAPKG=mariadb-test
23+
sudo: required
2224
- addons:
2325
mariadb: 10.0
24-
env: TOX_ENV=py33
26+
env:
27+
- TOX_ENV=py33
28+
- EXTRAPKG=mariadb-test
29+
- PAMCLEAR=1
30+
sudo: required
2531
- addons:
2632
mariadb: 10.1
27-
env: TOX_ENV=py34
33+
env:
34+
- TOX_ENV=py34
35+
- EXTRAPKG=mariadb-test
36+
sudo: required
2837
- env:
2938
- TOX_ENV=py34
3039
- DB=5.6.26
@@ -55,6 +64,16 @@ matrix:
5564
# really only need libaio1 for DB builds however libaio-dev is whitelisted for container builds and liaio1 isn't
5665

5766
install:
67+
- if [ -n "${EXTRAPKG}" ]; then
68+
sudo apt-get install ${EXTRAPKG};
69+
fi
70+
- if [ -n "${PAMCLEAR}" ]; then
71+
echo -e '[mysqld]\n\npam-use-cleartext-plugin' | sudo tee -a /etc/mysql/conf.d/pam-cleartext.cnf;
72+
mysql -u root -e "install plugin pam soname 'auth_pam.so'";
73+
sudo service mysql restart;
74+
fi
75+
- export PASSWORD=travis;
76+
- export PAMSERVICE=chfn;
5877
- pip install -U tox coveralls
5978

6079
before_script:
@@ -63,7 +82,7 @@ before_script:
6382
- mysql -e 'create database test_pymysql2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
6483
- mysql -u root -e "create user travis_pymysql2 identified by 'some password'; grant all on test_pymysql2.* to travis_pymysql2;"
6584
- mysql -u root -e "create user travis_pymysql2@localhost identified by 'some password'; grant all on test_pymysql2.* to travis_pymysql2@localhost;"
66-
- mysql -e 'select VERSION();'
85+
- mysql -e 'select VERSION()'
6786
- rm -f ~/.my.cnf # set in .travis.initialize.db.sh for the above commands - we should be using database.json however
6887
- export COVERALLS_PARALLEL=true
6988

@@ -72,6 +91,13 @@ script:
7291

7392
after_success:
7493
- coveralls
94+
- cat /tmp/mysql.err
95+
- if [ -n "${PAMCLEAR}" ]; then
96+
sudo cat /var/log/syslog;
97+
fi
7598

7699
after_failure:
77100
- cat /tmp/mysql.err
101+
- if [ -n "${PAMCLEAR}" ]; then
102+
sudo cat /var/log/syslog;
103+
fi

0 commit comments

Comments
 (0)