PS-9771 fix of component_keyring_kmip test fro usage with PyKMIP docker#5646
Conversation
| --echo # ---------------------------------------------------------------------- | ||
|
|
||
| --exec python std_data/kmip_clear.py | ||
| #--exec python std_data/kmip_clear.py |
There was a problem hiding this comment.
❌ clang-diagnostic-error ❌
invalid preprocessing directive
There was a problem hiding this comment.
We use new docker container every time, no need to waste time for cleanup. Also, python module might be missing in the docker image that runs tests
| @@ -22,7 +22,7 @@ | |||
|
|
|||
| # Create local keyring config | |||
There was a problem hiding this comment.
❌ clang-diagnostic-error ❌
invalid preprocessing directive
| --let KEYRING_CONFIG_CONTENT = `SELECT CONCAT('{ \"path\": \"', '$KEYRING_KMIP_PATH', '\", \"server_addr\": \"', '$KMIP_ADDR', '\", \"server_port\": \"', '$KMIP_PORT', '\", \"client_ca\": \"', '$KMIP_CLIENT_CA', '\", \"client_key\": \"', '$KMIP_CLIENT_KEY', '\", \"server_ca\": \"', '$KMIP_SERVER_CA', '\", \"object_group\": \"', 'test-object-group', '\" }')` | ||
| --source include/keyring_tests/helper/local_keyring_create_config.inc | ||
|
|
||
| # Create local manifest file for current server instance |
There was a problem hiding this comment.
❌ clang-diagnostic-error ❌
invalid preprocessing directive
| @@ -14,7 +14,7 @@ | |||
|
|
|||
| # Create global keyring config | |||
There was a problem hiding this comment.
❌ clang-diagnostic-error ❌
invalid preprocessing directive
| --let KEYRING_CONFIG_CONTENT = `SELECT CONCAT('{ \"path\": \"', '$KEYRING_KMIP_PATH','\", \"server_addr\": \"127.0.0.1\", \"server_port\": \"5696\", \"client_ca\": \"/tmp/certs/mysql-client-cert.pem\", \"client_key\":\"/tmp/certs/mysql-client-key.pem\", \"server_ca\":\"/tmp/certs/vault-kmip-ca.pem\" }')` | ||
| --source include/keyring_tests/helper/global_keyring_create_customized_config.inc | ||
|
|
||
| # Restart server with manifest file |
There was a problem hiding this comment.
❌ clang-diagnostic-error ❌
invalid preprocessing directive
| # Create local keyring config | ||
| --let KEYRING_KMIP_PATH = `SELECT CONCAT( '$MYSQLTEST_VARDIR', '/keyring_kmip')` | ||
| --let KEYRING_CONFIG_CONTENT = `SELECT CONCAT('{ \"path\": \"', '$KEYRING_KMIP_PATH', '\", \"server_addr\": \"', '$KMIP_ADDR', '\", \"server_port\": \"', '$KMIP_PORT', '\", \"client_ca\": \"', '$KMIP_CLIENT_CA', '\", \"client_key\": \"', '$KMIP_CLIENT_KEY', '\", \"server_ca\": \"', '$KMIP_SERVER_CA', '\" }')` | ||
| --let KEYRING_CONFIG_CONTENT = `SELECT CONCAT('{ \"path\": \"', '$KEYRING_KMIP_PATH', '\", \"server_addr\": \"', '$KMIP_ADDR', '\", \"server_port\": \"', '$KMIP_PORT', '\", \"client_ca\": \"', '$KMIP_CLIENT_CA', '\", \"client_key\": \"', '$KMIP_CLIENT_KEY', '\", \"server_ca\": \"', '$KMIP_SERVER_CA', '\", \"object_group\": \"', 'test-object-group', '\" }')` |
There was a problem hiding this comment.
Here and everywhere, there is a very convenient JSON_OBJECT() MySQL function
--let KEYRING_CONFIG_CONTENT = `SELECT JSON_OBJECT('path', '$KEYRING_KMIP_PATH', 'server_addr', '$KMIP_ADDR', ...)
There was a problem hiding this comment.
Yes, you're right. But I do not want to "change the world" :) I just added a group to config.
| --echo # ---------------------------------------------------------------------- | ||
|
|
||
| --exec python std_data/kmip_clear.py | ||
| #--exec python std_data/kmip_clear.py |
f30e2b3 to
e21dc69
Compare
https://perconadev.atlassian.net/browse/PS-9771 Tests results updated to pass with PyKMIP docker image from https://github.com/Percona-Lab/pxb-jenkins-images; README added to de-mystify KMIP tests; No cleanup after KMIP tests, we use new docker every time. The KMIP keyring backend now checks connexction during initialization, reports error and fails if connection is not successful.
e21dc69 to
9ea32fd
Compare
https://perconadev.atlassian.net/browse/PS-9771
Tests results updated to pass with PyKMIP docker image from https://github.com/Percona-Lab/pxb-jenkins-images
README added to de-mystify KMIP tests