Skip to content

Commit

Permalink
Merge pull request PyMySQL#353 from grooverdan/expose_auth_plugin_name
Browse files Browse the repository at this point in the history
Add authentication plugin support
  • Loading branch information
methane committed Jan 3, 2016
2 parents c7a319c + ee78b2d commit 1893637
Show file tree
Hide file tree
Showing 7 changed files with 585 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
branch = True
source =
pymysql
omit = pymysql/test/*
omit = pymysql/tests/*
pymysql/tests/thirdparty/test_MySQLdb/*

[report]
Expand Down
36 changes: 31 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ python: "3.4"
cache:
pip: true


env:
matrix:
- TOX_ENV=py26
Expand All @@ -18,13 +17,23 @@ matrix:
include:
- addons:
mariadb: 5.5
env: TOX_ENV=py27
env:
- TOX_ENV=py27
- EXTRAPKG=mariadb-test
sudo: required
- addons:
mariadb: 10.0
env: TOX_ENV=py33
env:
- TOX_ENV=py33
- EXTRAPKG=mariadb-test
- PAMCLEAR=1
sudo: required
- addons:
mariadb: 10.1
env: TOX_ENV=py34
env:
- TOX_ENV=py34
- EXTRAPKG=mariadb-test
sudo: required
- env:
- TOX_ENV=py34
- DB=5.6.26
Expand Down Expand Up @@ -55,6 +64,16 @@ matrix:
# really only need libaio1 for DB builds however libaio-dev is whitelisted for container builds and liaio1 isn't

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

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

Expand All @@ -72,6 +91,13 @@ script:

after_success:
- coveralls
- cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog;
fi

after_failure:
- cat /tmp/mysql.err
- if [ -n "${PAMCLEAR}" ]; then
sudo cat /var/log/syslog;
fi
Loading

0 comments on commit 1893637

Please sign in to comment.