| 1 |
# |
| 2 |
# Validate that Group Replication ssl mode option values. |
| 3 |
# |
| 4 |
# Steps: |
| 5 |
# 1. Set invalid values to ssl mode, all must fail. |
| 6 |
# 2. Set ssl mode using its enum index. |
| 7 |
# 3. Set ssl mode valid values. |
| 8 |
# 4. Clean up. |
| 9 |
# |
| 10 |
--source include/have_group_replication_plugin.inc |
| 11 |
--let $rpl_skip_group_replication_start= 1 |
| 12 |
--source include/group_replication.inc |
| 13 |
|
| 14 |
--let $rpl_connection_name= server2 |
| 15 |
--source include/rpl_connection.inc |
| 16 |
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; |
| 17 |
--let $rpl_connection_name= server1 |
| 18 |
--source include/rpl_connection.inc |
| 19 |
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; |
| 20 |
|
| 21 |
|
| 22 |
--echo |
| 23 |
--echo ############################################################ |
| 24 |
--echo # 1. Set invalid values to ssl mode, all must fail. |
| 25 |
--error ER_WRONG_VALUE_FOR_VAR |
| 26 |
SET GLOBAL group_replication_ssl_mode= -1; |
| 27 |
|
| 28 |
--error ER_WRONG_VALUE_FOR_VAR |
| 29 |
SET GLOBAL group_replication_ssl_mode= 4; |
| 30 |
|
| 31 |
--error ER_WRONG_VALUE_FOR_VAR |
| 32 |
SET GLOBAL group_replication_ssl_mode= "foo"; |
| 33 |
|
| 34 |
--error ER_WRONG_VALUE_FOR_VAR |
| 35 |
SET GLOBAL group_replication_ssl_mode= NULL; |
| 36 |
|
| 37 |
|
| 38 |
--echo |
| 39 |
--echo ############################################################ |
| 40 |
--echo # 2. Set ssl mode using its enum index. |
| 41 |
SET GLOBAL group_replication_ssl_mode= 0; |
| 42 |
--let $assert_text= group_replication_ssl_mode must be set to DISABLED |
| 43 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "DISABLED" |
| 44 |
--source include/assert.inc |
| 45 |
|
| 46 |
SET GLOBAL group_replication_ssl_mode= 1; |
| 47 |
--let $assert_text= group_replication_ssl_mode must be set to REQUIRED |
| 48 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "REQUIRED" |
| 49 |
--source include/assert.inc |
| 50 |
|
| 51 |
SET GLOBAL group_replication_ssl_mode= 2; |
| 52 |
--let $assert_text= group_replication_ssl_mode must be set to VERIFY_CA |
| 53 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "VERIFY_CA" |
| 54 |
--source include/assert.inc |
| 55 |
|
| 56 |
SET GLOBAL group_replication_ssl_mode= 3; |
| 57 |
--let $assert_text= group_replication_ssl_mode must be set to VERIFY_IDENTITY |
| 58 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "VERIFY_IDENTITY" |
| 59 |
--source include/assert.inc |
| 60 |
|
| 61 |
|
| 62 |
--echo |
| 63 |
--echo ############################################################ |
| 64 |
--echo # 3. Set ssl mode valid values. |
| 65 |
SET GLOBAL group_replication_ssl_mode= DISABLED; |
| 66 |
--let $assert_text= group_replication_ssl_mode must be set to DISABLED |
| 67 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "DISABLED" |
| 68 |
--source include/assert.inc |
| 69 |
|
| 70 |
SET GLOBAL group_replication_ssl_mode= REQUIRED; |
| 71 |
--let $assert_text= group_replication_ssl_mode must be set to REQUIRED |
| 72 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "REQUIRED" |
| 73 |
--source include/assert.inc |
| 74 |
|
| 75 |
SET GLOBAL group_replication_ssl_mode= VERIFY_CA; |
| 76 |
--let $assert_text= group_replication_ssl_mode must be set to VERIFY_CA |
| 77 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "VERIFY_CA" |
| 78 |
--source include/assert.inc |
| 79 |
|
| 80 |
SET GLOBAL group_replication_ssl_mode= VERIFY_IDENTITY; |
| 81 |
--let $assert_text= group_replication_ssl_mode must be set to VERIFY_IDENTITY |
| 82 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "VERIFY_IDENTITY" |
| 83 |
--source include/assert.inc |
| 84 |
|
| 85 |
SET GLOBAL group_replication_ssl_mode= DEFAULT; |
| 86 |
--let $assert_text= group_replication_ssl_mode must be set to DISABLED |
| 87 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "DISABLED" |
| 88 |
--source include/assert.inc |
| 89 |
|
| 90 |
|
| 91 |
--echo |
| 92 |
--echo ############################################################ |
| 93 |
--echo # 4. Clean up. |
| 94 |
--let $rpl_connection_name= server1 |
| 95 |
--source include/rpl_connection.inc |
| 96 |
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save; |
| 97 |
|
| 98 |
--let $rpl_connection_name= server2 |
| 99 |
--source include/rpl_connection.inc |
| 100 |
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save; |
| 101 |
|
| 102 |
--source include/group_replication_end.inc |