Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
yanw-bq committed Mar 29, 2023
1 parent fcaef7c commit 4b45ead
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
7 changes: 0 additions & 7 deletions driver/connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -753,17 +753,10 @@ SQLRETURN DBC::connect(DataSource *dsrc, bool failover_enabled)

const char* user = ds_get_utf8attr(dsrc->uid, &dsrc->uid8);
const char* password = ds_get_utf8attr(dsrc->pwd, &dsrc->pwd8);
<<<<<<< HEAD
const char* database = ds_get_utf8attr(dsrc->database, &dsrc->database8);
const char* socket = ds_get_utf8attr(dsrc->socket, &dsrc->socket8);

const bool connect_result = connection_proxy->connect(host, user, password, database, port, socket, flags);
=======
const char* db = ds_get_utf8attr(dsrc->database, &dsrc->database8);
const char* socket = ds_get_utf8attr(dsrc->socket, &dsrc->socket8);

const bool connect_result = connection_proxy->connect(host, user, password, db, port, socket, flags);
>>>>>>> 1bbbca4d (address comments)
if (!connect_result)
{
unsigned int native_error= connection_proxy->error_code();
Expand Down
4 changes: 0 additions & 4 deletions driver/connection_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ CONNECTION_PROXY::~CONNECTION_PROXY() {
}
}

<<<<<<< HEAD
bool CONNECTION_PROXY::connect(const char* host, const char* user, const char* password,
const char* database, unsigned int port, const char* socket, unsigned long flags) {

=======
bool CONNECTION_PROXY::connect(const char* host, const char* user, const char* password, const char* database, unsigned int port, const char* socket, unsigned long flags) {
>>>>>>> 1bbbca4d (address comments)
if (ds->enable_dns_srv) {
return this->real_connect_dns_srv(host, user, password, database, flags);
}
Expand Down
4 changes: 3 additions & 1 deletion unit_testing/test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void allocate_odbc_handles(SQLHENV& env, DBC*& dbc, DataSource*& ds) {
ds = ds_new();
}

void cleanup_odbc_handles(SQLHENV env, DBC*& dbc, DataSource*& ds, bool call_myodbc_end) {
void cleanup_odbc_handles(SQLHENV& env, DBC*& dbc, DataSource*& ds, bool call_myodbc_end) {
SQLHDBC hdbc = static_cast<SQLHDBC>(dbc);
if (nullptr != hdbc) {
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
Expand Down Expand Up @@ -121,6 +121,8 @@ bool TEST_UTILS::token_cache_contains_key(std::string cache_key) {

void TEST_UTILS::clear_token_cache(IAM_PROXY* iam_proxy) {
iam_proxy->clear_token_cache();
}

std::map<std::pair<Aws::String, Aws::String>, Aws::Utils::Json::JsonValue>& TEST_UTILS::get_secrets_cache() {
return std::ref(SECRETS_MANAGER_PROXY::secrets_cache);
}
3 changes: 0 additions & 3 deletions unit_testing/test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ class TEST_UTILS {
static std::shared_ptr<MONITOR> get_available_monitor(std::shared_ptr<MONITOR_THREAD_CONTAINER> container);
static size_t get_map_size(std::shared_ptr<MONITOR_THREAD_CONTAINER> container);
static std::list<std::shared_ptr<MONITOR_CONNECTION_CONTEXT>> get_contexts(std::shared_ptr<MONITOR> monitor);
<<<<<<< HEAD
static std::string build_cache_key(const char* host, const char* region, unsigned int port, const char* user);
static bool token_cache_contains_key(std::string cache_key);
static void clear_token_cache(IAM_PROXY* iam_proxy);
=======
static std::map<std::pair<Aws::String, Aws::String>, Aws::Utils::Json::JsonValue>& get_secrets_cache();
>>>>>>> bbfc1469 (first unit test for secrets manager proxy)
};

#endif /* __TESTUTILS_H__ */

0 comments on commit 4b45ead

Please sign in to comment.