mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
few PostgreSQL fixes
This commit is contained in:
committed by
Günter Obiltschnig
parent
6058f5dd23
commit
854bf4d79f
@@ -26,6 +26,7 @@
|
||||
#include "Poco/Data/DataException.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data;
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::PostgreSQL::ConnectionException;
|
||||
@@ -39,45 +40,56 @@ using Poco::Tuple;
|
||||
using Poco::NamedTuple;
|
||||
using Poco::Environment;
|
||||
|
||||
|
||||
Poco::SharedPtr<Poco::Data::Session> PostgreSQLTest::_pSession = 0;
|
||||
Poco::SharedPtr<SQLExecutor> PostgreSQLTest::_pExecutor = 0;
|
||||
|
||||
|
||||
//
|
||||
// Connection string
|
||||
std::string PostgreSQLTest::_dbConnString;
|
||||
|
||||
|
||||
//
|
||||
// Parameters for barebone-test
|
||||
//
|
||||
std::string PostgreSQLTest::getHost() {
|
||||
std::string PostgreSQLTest::getHost()
|
||||
{
|
||||
return "localhost";
|
||||
}
|
||||
std::string PostgreSQLTest::getPort() {
|
||||
|
||||
|
||||
std::string PostgreSQLTest::getPort()
|
||||
{
|
||||
return "5432";
|
||||
}
|
||||
std::string PostgreSQLTest::getBase(){
|
||||
|
||||
|
||||
std::string PostgreSQLTest::getBase()
|
||||
{
|
||||
return "postgres";
|
||||
}
|
||||
std::string PostgreSQLTest::getUser(){
|
||||
|
||||
|
||||
std::string PostgreSQLTest::getUser()
|
||||
{
|
||||
return "postgres";
|
||||
}
|
||||
std::string PostgreSQLTest::getPass(){
|
||||
|
||||
|
||||
std::string PostgreSQLTest::getPass()
|
||||
{
|
||||
if (Environment::has("APPVEYOR"))
|
||||
{
|
||||
return "Password12!";
|
||||
}
|
||||
else if (Environment::has("JENKINS_HOME"))
|
||||
else
|
||||
{
|
||||
return "postgres";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "poco";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
PostgreSQLTest::PostgreSQLTest(const std::string& name):
|
||||
CppUnit::TestCase(name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user