From dbd2b89ecca35bf8b74fa1621237c9accfcf0949 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Wed, 7 Jul 2021 17:27:25 +0200
Subject: [PATCH] WIP: retrieve simple entity

---
 .docker/tester.yml        |  3 +--
 test/test_connection.cpp  |  2 +-
 test/test_connection.h    | 12 +++---------
 test/test_transaction.cpp | 11 ++++-------
 4 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/.docker/tester.yml b/.docker/tester.yml
index f3a69bd..f801f42 100644
--- a/.docker/tester.yml
+++ b/.docker/tester.yml
@@ -4,8 +4,7 @@ services:
     image: "$CPPINTTEST_REGISTRY_IMAGE"
     environment:
       CAOSDB_SERVER_HOST: caosdb-server
-      CAOSDB_SERVER_PORT: 8443
-      CAOSDB_SERVER_CA_PEM: /cert/caosdb.cert.pem
+      CAOSDB_SERVER_CERT: /cert/caosdb.cert.pem
     networks:
       - docker_caosnet
     volumes:
diff --git a/test/test_connection.cpp b/test/test_connection.cpp
index ce657f1..fddc26b 100644
--- a/test/test_connection.cpp
+++ b/test/test_connection.cpp
@@ -107,7 +107,7 @@ TEST(test_connection, connection_ssl_authentication_error_wrong_credentials) {
 }
 
 TEST(test_connection, connection_ssl_authentication_success) {
-  auto pConnection = get_test_connection();
+  const auto &pConnection = get_test_connection();
 
   auto major = 0;
   auto minor = 5;
diff --git a/test/test_connection.h b/test/test_connection.h
index 8360121..9c60f45 100644
--- a/test/test_connection.h
+++ b/test/test_connection.h
@@ -18,17 +18,11 @@
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
  *
  */
-#include <gtest/gtest-message.h>   // for Message
-#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartResult
-#include <memory>                  // for make_shared, allocator, shared_ptr
-#include <string>                  // for string
+#include <memory>                  // for allocator, make_shared, shared_ptr
+#include <string>                  // for stoi, string
 #include "caosdb/authentication.h" // for PlainPasswordAuthenticator
-#include "caosdb/connection.h"     // for InsecureCaosDBConnectionConfig
-#include "caosdb/exceptions.h"     // for AuthenticationError, ConnectionError
-#include "caosdb/info.h"           // for VersionInfo
+#include "caosdb/connection.h"     // for PemFileCACertProvider, SslCaosDBC...
 #include "caosdb/utils.h"          // for get_env_var
-#include "gtest/gtest_pred_impl.h" // for Test, TEST, EXPECT_EQ, EXPECT_THROW
-#include "caosdb_test_utility.h"
 
 namespace caosdb::connection {
 using caosdb::authentication::PlainPasswordAuthenticator;
diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp
index 7caa35c..8218efe 100644
--- a/test/test_transaction.cpp
+++ b/test/test_transaction.cpp
@@ -20,20 +20,17 @@
  */
 #include <gtest/gtest-message.h>   // for Message
 #include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl
-#include <memory>                  // for allocator, make_shared, static_po...
-#include <string>                  // for stoi
-#include "caosdb/authentication.h" // for PlainPasswordAuthenticator
-#include "caosdb/connection.h"     // for InsecureCaosDBConnectionConfig
+#include <memory>                  // for allocator, static_pointer_cast
+#include "caosdb/connection.h"     // for CaosDBConnection
 #include "caosdb/entity.h"         // for Entity, EntityID
 #include "caosdb/transaction.h"    // for Transaction, UniqueResult, Entity
-#include "caosdb/utils.h"          // for get_env_var
 #include "gtest/gtest_pred_impl.h" // for Test, TestInfo, EXPECT_EQ, TEST
-#include "test_connection.h"
+#include "test_connection.h"       // for get_test_connection
 
 namespace caosdb::transaction {
 
 TEST(test_transaction, first_test) {
-  const auto& connection = caosdb::connection::get_test_connection();
+  const auto &connection = caosdb::connection::get_test_connection();
 
   const auto *description = "This is an entity";
   auto transaction(connection->CreateTransaction());
-- 
GitLab