mirror of
https://github.com/mariadb-corporation/mariadb-connector-cpp.git
synced 2025-07-31 21:00:43 +00:00
Made all tests configurable via env variables
Tests connection credentials can be passed using env variables. All tests use the same settings for that. Added the link to the documentation to the README(.md) Changed in SQLString all size_t to std::size_t(more like for consictency). Added npos constant there
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* 2020 MariaDB Corporation AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2.0, as
|
||||
@ -47,14 +48,14 @@ int main(int argc, char** argv)
|
||||
|
||||
Properties defaultStringValues;
|
||||
|
||||
defaultStringValues.insert(Properties::value_type("dbUrl" ,TEST_DEFAULT_HOST ));
|
||||
defaultStringValues.insert(Properties::value_type("dbUser" ,TEST_DEFAULT_LOGIN ));
|
||||
defaultStringValues.insert(Properties::value_type("dbPasswd",TEST_DEFAULT_PASSWD));
|
||||
defaultStringValues.insert(Properties::value_type("dbSchema",TEST_DEFAULT_DB ));
|
||||
defaultStringValues.insert(Properties::value_type("dbUrl", HOST_ENV_OR_DEFAULT));
|
||||
defaultStringValues.insert(Properties::value_type("dbUser", UID_ENV_OR_DEFAULT));
|
||||
defaultStringValues.insert(Properties::value_type("dbPasswd", PASSWD_ENV_OR_DEFAULT));
|
||||
defaultStringValues.insert(Properties::value_type("dbSchema", SCHEMA_ENV_OR_DEFAULT));
|
||||
|
||||
std::map<String, bool> defaultBoolValues;
|
||||
|
||||
defaultBoolValues["useTls"]= TEST_USETLS;
|
||||
defaultBoolValues["useTls"] = USETLS_ENV_OR_DEFAULT;
|
||||
|
||||
testsuite::StartOptions options(unnamedStartParams, & defaultStringValues
|
||||
, & defaultBoolValues);
|
||||
|
Reference in New Issue
Block a user