MXS-1662: Test PAM admin authentication

The test checks that the vagrant user has access to the REST API.
This commit is contained in:
Markus Mäkelä 2019-04-16 20:31:41 +03:00
parent 067660e3e7
commit 11814762b5
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
3 changed files with 21 additions and 0 deletions

View File

@ -943,6 +943,9 @@ add_test_executable(mxs2313_rank.cpp mxs2313_rank mxs2313_rank LABELS readwrites
# MXS-2417: Ignore persisted configs with load_persisted_configs=false
add_test_executable(mxs2417_ignore_persisted_cnf.cpp mxs2417_ignore_persisted_cnf mxs2417_ignore_persisted_cnf LABELS REPL_BACKEND)
# MXS-1662: PAM admin authentication
add_test_executable(mxs1662_pam_admin.cpp mxs1662_pam_admin mxs1662_pam_admin LABELS REPL_BACKEND)
############################################
# BEGIN: binlogrouter and avrorouter tests #
############################################

View File

@ -0,0 +1,3 @@
[maxscale]
threads=###threads###
admin_pam_readwrite_service=passwd

View File

@ -0,0 +1,15 @@
/**
* MXS-1662: PAM authenticator for admin users
*/
#include "testconnections.h"
int main(int argc, char** argv)
{
TestConnections test(argc, argv);
// TODO: Store login information
test.check_maxctrl("-u vagrant -p vagrant show maxscale");
return test.global_result;
}