Skip to content

Commit 216ff9a

Browse files
authored
Merge branch 'devel' into refactor-DAPS-1522-Note-Router-Logging-Improvements
2 parents 88f4d1c + b1ff077 commit 216ff9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+410
-115
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ scripts/admin_datafed_backup.sh
5353
scripts/admin_refresh_certs.sh
5454
scripts/globus/__pycache__
5555
services/
56-
tmp/
56+
tests/mock_core/Version.hpp
57+
tmp
5758
web/SDMS.proto
5859
web/SDMS_Anon.proto
5960
web/SDMS_Auth.proto

CMakeLists.txt

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ OPTION(BUILD_PYTHON_CLIENT "Build python client" TRUE)
2727
OPTION(BUILD_TESTS "Build Tests" TRUE)
2828
OPTION(BUILD_WEB_SERVER "Build DataFed Web Server" TRUE)
2929
OPTION(ENABLE_UNIT_TESTS "Enable unit tests" TRUE)
30+
OPTION(ENABLE_INTEGRATION_TESTS "Enable integration tests" TRUE)
3031
OPTION(ENABLE_MEMORY_TESTS "Enable memory tests" FALSE)
3132
OPTION(BUILD_SHARED_LIBS "By default DataFed tries to build static libraries
3233
with the exception of libdatafed-authz which must always be a shared library,
@@ -79,7 +80,6 @@ endif()
7980

8081
if(NOT DEFINED DATAFED_DOMAIN)
8182
get_value_from_datafed_sh("DATAFED_DOMAIN" DATAFED_DOMAIN)
82-
message("TESTING: DATAFED_DOMAIN : ${DATAFED_DOMAIN}")
8383
endif()
8484

8585
if(NOT DEFINED DATAFED_DEPENDENCIES_INSTALL_PATH)
@@ -188,6 +188,12 @@ if( BUILD_FOXX OR BUILD_CORE_SERVER )
188188
add_subdirectory( core )
189189
endif()
190190

191+
# Must occur before building authz, location of mock keys are defined here
192+
# ENV DATAFED_MOCK_CORE_PUB_KEY
193+
if (ENABLE_INTEGRATION_TESTS OR ENABLE_END_TO_END_TESTS)
194+
add_subdirectory(tests)
195+
endif()
196+
191197
if( BUILD_REPO_SERVER OR BUILD_AUTHZ)
192198
add_subdirectory( repository )
193199
endif()
@@ -241,26 +247,6 @@ if( INSTALL_FOXX )
241247
)
242248
endif()
243249

244-
if (ENABLE_END_TO_END_TESTS)
245-
if (NOT ENABLE_END_TO_END_API_TESTS AND NOT ENABLE_END_TO_END_WEB_TESTS)
246-
message (FATAL_ERROR "Cannot run end-to-end tests because one of the ENABLE_END_TO_END web or API flag is not on")
247-
else()
248-
add_subdirectory(tests/end-to-end)
249-
add_subdirectory(tests/end-to-end/web-UI)
250-
endif()
251-
else()
252-
if (ENABLE_END_TO_END_API_TESTS)
253-
if (BUILD_PYTHON_CLIENT)
254-
add_subdirectory(tests/end-to-end)
255-
else()
256-
message (FATAL_ERROR "Cannot run end-to-end tests because BUILD_PYTHON_CLIENT is not on")
257-
endif()
258-
endif()
259-
if (ENABLE_END_TO_END_WEB_TESTS)
260-
add_subdirectory(tests/end-to-end/web-UI)
261-
endif()
262-
endif()
263-
264250
find_library(SODIUM NAMES libsodium.a PATHS ${DEPENDENCY_INSTALL_PATH}/lib)
265251

266252
# This is not needed but it is used by zmq I think so we want to print what is found locally just in case

cmake/Boost.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
# Allow using legacy Boost find_package call.
3+
if(POLICY CMP0167)
4+
cmake_policy(SET CMP0167 OLD)
5+
endif()
6+
27
function(find_boost_library)
38
if ( DEFINED ENV{BOOST_INC} AND DEFINED ENV{BOOST_LIB} )
49
message( "BOOST_INC:" $ENV{BOOST_INC} )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
2-
SCRIPT=$(realpath "$0")
2+
SCRIPT=$(realpath "${BASH_SOURCE[0]}")
33
SOURCE=$(dirname "$SCRIPT")
44
PROJECT_ROOT=$(realpath "${SOURCE}/../../")
55

6+
set -euf -o pipefail
7+
68
"${PROJECT_ROOT}/scripts/compose_generate_globus_files.sh" -d "$(pwd)"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
SCRIPT=$(realpath "${BASH_SOURCE[0]}")
3+
SOURCE=$(dirname "$SCRIPT")
4+
PROJECT_ROOT=$(realpath "${SOURCE}/../../")
5+
6+
set -euf -o pipefail
7+
8+
"${PROJECT_ROOT}/scripts/compose_generate_web_server_globus_credentials.sh" -d "$(pwd)"
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
2-
SCRIPT=$(realpath "$0")
2+
SCRIPT=$(realpath "${BASH_SOURCE[0]}")
33
SOURCE=$(dirname "$SCRIPT")
44
PROJECT_ROOT=$(realpath "${SOURCE}/../../")
55

6+
set -euf -o pipefail
7+
68
"${PROJECT_ROOT}/scripts/compose_generate_globus_files.sh" -d "$(pwd)"

core/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ RUN ${DATAFED_DEPENDENCIES_ROOT}/scripts/generate_dependencies_config.sh && \
5252
-DBUILD_WEB_SERVER=False \
5353
-DBUILD_DOCS=False \
5454
-DBUILD_PYTHON_CLIENT=False \
55-
-DBUILD_FOXX=False
55+
-DBUILD_FOXX=False \
56+
-DENABLE_INTEGRATION_TESTS=False
5657
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build -j 8
5758
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build --target install
5859

docker/entrypoint_foxx.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ if [ ! -f "$install_flag" ]; then
6767
-DBUILD_PYTHON_CLIENT=False
6868
-DBUILD_FOXX=True
6969
-DINSTALL_FOXX=True
70+
-DENABLE_INTEGRATION_TESTS=False
7071
)
7172

7273
# Add the ENABLE_FOXX_TESTS option if it's set to TRUE

repository/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ RUN ${DATAFED_DEPENDENCIES_ROOT}/scripts/generate_dependencies_config.sh && \
5353
-DBUILD_WEB_SERVER=False \
5454
-DBUILD_DOCS=False \
5555
-DBUILD_PYTHON_CLIENT=False \
56-
-DBUILD_FOXX=False
56+
-DBUILD_FOXX=False \
57+
-DENABLE_INTEGRATION_TESTS=False
5758
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build -j 8
5859
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build --target install
5960

repository/docker/Dockerfile.gcs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ RUN ${DATAFED_DEPENDENCIES_ROOT}/scripts/generate_dependencies_config.sh && \
7070
-DBUILD_WEB_SERVER=False \
7171
-DBUILD_DOCS=False \
7272
-DBUILD_PYTHON_CLIENT=False \
73-
-DBUILD_FOXX=False
73+
-DBUILD_FOXX=False \
74+
-DENABLE_INTEGRATION_TESTS=False
7475
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build -j 8
7576
RUN ${DATAFED_DEPENDENCIES_INSTALL_PATH}/bin/cmake --build build --target install
7677

0 commit comments

Comments
 (0)