Skip to content

Commit e3c4494

Browse files
committed
Merge branch 'devel' into 1724-DAPS-feature-python-client-support-task-and-direct-response-allocation-create
2 parents aae7393 + 0d61ce3 commit e3c4494

Some content is hidden

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

56 files changed

+1226
-197
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
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/database/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ if( ENABLE_FOXX_TESTS )
2828
add_test(NAME foxx_version COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_version:")
2929
add_test(NAME foxx_support COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_support:")
3030
add_test(NAME foxx_user_router COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_user_router:")
31+
add_test(NAME foxx_task_router COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_task_router:")
3132
add_test(NAME foxx_authz_router COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_authz_router:")
33+
add_test(NAME foxx_query_router COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_query_router:")
3234
add_test(NAME foxx_unit_user_token COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_user_token:")
3335
add_test(NAME foxx_unit_user_model COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_user_model:")
3436
add_test(NAME foxx_unit_globus_collection_model COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_foxx.sh" -t "unit_globus_collection_model:")
@@ -51,6 +53,8 @@ if( ENABLE_FOXX_TESTS )
5153
set_tests_properties(foxx_validation_repo PROPERTIES FIXTURES_REQUIRED Foxx)
5254
set_tests_properties(foxx_path PROPERTIES FIXTURES_REQUIRED Foxx)
5355
set_tests_properties(foxx_user_router PROPERTIES FIXTURES_REQUIRED "Foxx;FoxxDBFixtures")
56+
set_tests_properties(foxx_query_router PROPERTIES FIXTURES_REQUIRED Foxx)
57+
set_tests_properties(foxx_task_router PROPERTIES FIXTURES_REQUIRED Foxx)
5458
set_tests_properties(foxx_unit_user_token PROPERTIES FIXTURES_REQUIRED Foxx)
5559
set_tests_properties(foxx_unit_user_model PROPERTIES FIXTURES_REQUIRED "Foxx;FoxxDBFixtures")
5660
set_tests_properties(foxx_unit_globus_collection_model PROPERTIES FIXTURES_REQUIRED "Foxx;FoxxDBFixtures")

0 commit comments

Comments
 (0)