diff --git a/services/backup/docker-server/contents/run_tests.sh b/services/backup/docker-server/contents/run_tests.sh --- a/services/backup/docker-server/contents/run_tests.sh +++ b/services/backup/docker-server/contents/run_tests.sh @@ -2,6 +2,6 @@ set -e -pushd transferred/server/cmake/build +pushd /transferred/server/cmake/build make test ARGS="-V" -popd # transferred/server/cmake/build +popd # /transferred/server/cmake/build diff --git a/services/backup/docker-server/contents/server/CMakeLists.txt b/services/backup/docker-server/contents/server/CMakeLists.txt --- a/services/backup/docker-server/contents/server/CMakeLists.txt +++ b/services/backup/docker-server/contents/server/CMakeLists.txt @@ -28,24 +28,11 @@ endif() file(GLOB GENERATED_CODE "./_generated/*.cc") -set(DEV_SOURCE_CODE "") -set(DEV_HEADERS_PATH "") if ($ENV{COMM_SERVICES_DEV_MODE} MATCHES 1) add_compile_definitions(COMM_SERVICES_DEV_MODE) - file(GLOB DEV_SOURCE_CODE "./dev/*.cpp" "./src/*.dev.cpp") - set(DEV_HEADERS_PATH "./dev") endif() file(GLOB SOURCE_CODE "./src/*.cpp" "./src/**/*.cpp") -list(FILTER SOURCE_CODE EXCLUDE REGEX ".*.dev.cpp$") - -foreach (ITEM ${DEV_SOURCE_CODE}) - string(REPLACE "/" ";" SPLIT_ITEM ${ITEM}) - list(GET SPLIT_ITEM -1 FILE_FULL_NAME) - string(REPLACE ".dev.cpp" ".cpp" FILE_NAME ${FILE_FULL_NAME}) - list(FILTER SOURCE_CODE EXCLUDE REGEX ".*${FILE_NAME}$") - list(APPEND SOURCE_CODE "${ITEM}") -endforeach() include_directories( ./src @@ -61,7 +48,6 @@ ${FOLLY_INCLUDES} ./lib/double-conversion ${Boost_INCLUDE_DIR} - ${DEV_HEADERS_PATH} ) # SERVER diff --git a/services/backup/docker-server/contents/server/src/AwsTools.cpp b/services/backup/docker-server/contents/server/src/AwsTools.cpp --- a/services/backup/docker-server/contents/server/src/AwsTools.cpp +++ b/services/backup/docker-server/contents/server/src/AwsTools.cpp @@ -7,6 +7,10 @@ std::unique_ptr getDynamoDBClient() { Aws::Client::ClientConfiguration config; config.region = AWS_REGION; +#ifdef COMM_SERVICES_DEV_MODE + config.endpointOverride = Aws::String("localstack:4566"); + config.scheme = Aws::Http::Scheme::HTTP; +#endif return std::make_unique(config); } diff --git a/services/backup/docker-server/contents/server/src/DatabaseManager.h b/services/backup/docker-server/contents/server/src/DatabaseManager.h --- a/services/backup/docker-server/contents/server/src/DatabaseManager.h +++ b/services/backup/docker-server/contents/server/src/DatabaseManager.h @@ -11,19 +11,12 @@ #include #include -#ifdef COMM_SERVICES_DEV_MODE -#include "DatabaseSimulator.h" -#endif - namespace comm { namespace network { namespace database { // this class should be thread-safe in case any shared resources appear class DatabaseManager { -#ifdef COMM_SERVICES_DEV_MODE - DatabaseSimulator dbSimulator; -#endif void innerPutItem( std::shared_ptr item,