~zisis00/drizzle/ldap_policy

« back to all changes in this revision

Viewing changes to plugin/auth_file/tests/t/dynamic_plugin.test

  • Committer: Zisis Sialveras
  • Date: 2012-08-09 18:18:22 UTC
  • mfrom: (2553.1.25 workspace)
  • Revision ID: zisis00@gmail.com-20120809181822-9wobhdfdx411tu5w
Some changes in ldap_policy

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Making connection using the username:password pair provided in dynamic.users1 file.
 
2
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
3
connect (connection1,localhost,auth_file_password,test_password1,,);
 
4
connection connection1;
 
5
 
 
6
#Test that the auth_file_users can't be replaced with an empty value
 
7
--error ER_WRONG_ARGUMENTS
 
8
SET GLOBAL auth_file_users="";
 
9
 
 
10
#Test that the auth_file_users can't be replaced with a non existent file
 
11
--replace_result $TOP_SRCDIR TOP_SRCDIR
 
12
--error ER_WRONG_ARGUMENTS
 
13
eval SET GLOBAL auth_file_users="$TOP_SRCDIR/plugin/auth_file/tests/t/dynamic.users3";
 
14
 
 
15
#Test that the auth_file_users can be replaced with a different file
 
16
--replace_result $TOP_SRCDIR TOP_SRCDIR
 
17
eval SET GLOBAL auth_file_users="$TOP_SRCDIR/plugin/auth_file/tests/t/dynamic.users2";
 
18
 
 
19
disconnect connection1;
 
20
# Test that the connection to database can't be now made using the old username:password pair given in dynamic.users1 file.
 
21
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
22
--replace_regex /@'.*?'/@'LOCALHOST'/
 
23
--error ER_ACCESS_DENIED_ERROR
 
24
connect (connection2,localhost,auth_file_password,test_password1,,);
 
25
 
 
26
# Test that the connection to database can now be made using the username:password pair provided in dynamic.users2 file
 
27
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 
28
connect (connection3,localhost,auth_file_password,test_password2,,);
 
29
connection connection3;
 
30
SELECT 1;
 
31
disconnect connection3;