2018-05-29 17:13:13 +08:00
|
|
|
set(test_prefix memgraph__unit__)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2022-01-21 17:22:36 +08:00
|
|
|
find_package(fmt REQUIRED)
|
|
|
|
find_package(gflags REQUIRED)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
|
2018-01-15 19:19:55 +08:00
|
|
|
add_custom_target(memgraph__unit)
|
|
|
|
|
2021-01-21 22:47:56 +08:00
|
|
|
set(memgraph_unit_main main.cpp)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
function(add_unit_test test_cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
_add_unit_test(${test_cpp} FALSE ${ARGN})
|
|
|
|
endfunction(add_unit_test)
|
|
|
|
|
|
|
|
function(add_unit_test_with_custom_main test_cpp)
|
|
|
|
_add_unit_test(${test_cpp} TRUE ${ARGN})
|
|
|
|
endfunction(add_unit_test_with_custom_main)
|
|
|
|
|
|
|
|
function(_add_unit_test test_cpp custom_main)
|
2018-05-29 17:13:13 +08:00
|
|
|
# get exec name (remove extension from the abs path)
|
|
|
|
get_filename_component(exec_name ${test_cpp} NAME_WE)
|
|
|
|
set(target_name ${test_prefix}${exec_name})
|
2021-01-21 22:47:56 +08:00
|
|
|
|
|
|
|
set(source_files
|
2022-07-07 19:30:28 +08:00
|
|
|
${test_cpp}
|
|
|
|
${ARGN})
|
2021-01-21 22:47:56 +08:00
|
|
|
|
|
|
|
if(NOT ${custom_main})
|
|
|
|
set(source_files
|
2022-07-07 19:30:28 +08:00
|
|
|
${source_files}
|
|
|
|
${memgraph_unit_main})
|
2021-01-21 22:47:56 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(${target_name} ${source_files})
|
2022-07-07 19:30:28 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
# OUTPUT_NAME sets the real name of a target when it is built and can be
|
|
|
|
# used to help create two targets of the same name even though CMake
|
|
|
|
# requires unique logical target names
|
|
|
|
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${exec_name})
|
2021-09-21 20:43:27 +08:00
|
|
|
target_link_libraries(${target_name} mg-memory mg-utils gtest gmock Threads::Threads dl)
|
2022-07-07 19:30:28 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
# register test
|
2020-09-21 18:22:40 +08:00
|
|
|
if(TEST_COVERAGE)
|
|
|
|
add_test(${target_name} env LLVM_PROFILE_FILE=${exec_name}.profraw ./${exec_name})
|
|
|
|
else()
|
|
|
|
add_test(${target_name} ${exec_name})
|
|
|
|
endif()
|
2022-07-07 19:30:28 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
# add to memgraph__unit target
|
|
|
|
add_dependencies(memgraph__unit ${target_name})
|
2021-01-21 22:47:56 +08:00
|
|
|
endfunction(_add_unit_test)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2021-09-09 22:10:19 +08:00
|
|
|
# Test utilities
|
|
|
|
add_library(storage_test_utils storage_test_utils.cpp)
|
|
|
|
target_link_libraries(storage_test_utils mg-storage-v2)
|
|
|
|
|
2021-06-22 14:43:19 +08:00
|
|
|
# Test integrations-kafka
|
|
|
|
add_library(kafka-mock STATIC kafka_mock.cpp)
|
2021-11-11 19:17:05 +08:00
|
|
|
target_link_libraries(kafka-mock mg-utils librdkafka++ librdkafka Threads::Threads gtest)
|
2021-06-22 14:43:19 +08:00
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
# Include directories are intentionally not set, because kafka-mock isn't meant to be used apart from unit tests
|
2021-06-22 14:43:19 +08:00
|
|
|
add_unit_test(integrations_kafka_consumer.cpp kafka_mock.cpp)
|
|
|
|
target_link_libraries(${test_prefix}integrations_kafka_consumer kafka-mock mg-integrations-kafka)
|
|
|
|
|
|
|
|
add_unit_test(mgp_kafka_c_api.cpp)
|
|
|
|
target_link_libraries(${test_prefix}mgp_kafka_c_api mg-query mg-integrations-kafka)
|
|
|
|
|
2021-06-24 16:39:35 +08:00
|
|
|
add_unit_test(mgp_trans_c_api.cpp)
|
|
|
|
target_link_libraries(${test_prefix}mgp_trans_c_api mg-query)
|
2021-06-22 14:43:19 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
# Test mg-query
|
2020-01-03 20:06:20 +08:00
|
|
|
add_unit_test(bfs_single_node.cpp)
|
2022-09-02 23:12:07 +08:00
|
|
|
target_link_libraries(${test_prefix}bfs_single_node mg-query mg-glue)
|
|
|
|
|
|
|
|
add_unit_test(bfs_fine_grained.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bfs_fine_grained mg-query mg-glue)
|
2020-01-03 20:06:20 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(cypher_main_visitor.cpp)
|
|
|
|
target_link_libraries(${test_prefix}cypher_main_visitor mg-query)
|
|
|
|
|
2020-01-03 20:06:20 +08:00
|
|
|
add_unit_test(interpreter.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}interpreter mg-communication mg-query mg-glue)
|
2020-01-03 20:06:20 +08:00
|
|
|
|
2019-01-25 22:45:13 +08:00
|
|
|
add_unit_test(plan_pretty_print.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}plan_pretty_print mg-query)
|
2019-01-25 22:45:13 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(query_cost_estimator.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_cost_estimator mg-query)
|
|
|
|
|
2020-01-03 20:06:20 +08:00
|
|
|
add_unit_test(query_dump.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_dump mg-communication mg-query)
|
2019-11-12 17:47:02 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(query_expression_evaluator.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_expression_evaluator mg-query)
|
2018-11-07 17:54:35 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(query_plan.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_plan mg-query)
|
2019-01-17 19:28:32 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(query_plan_accumulate_aggregate.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_accumulate_aggregate mg-query mg-glue)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_bag_semantics.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_bag_semantics mg-query mg-glue)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_create_set_remove_delete.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_create_set_remove_delete mg-query mg-glue)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2020-01-03 20:06:20 +08:00
|
|
|
add_unit_test(query_plan_edge_cases.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_edge_cases mg-communication mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_match_filter_return.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_match_filter_return mg-query mg-query mg-glue)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2021-01-19 19:08:38 +08:00
|
|
|
add_unit_test(query_plan_read_write_typecheck.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/query/plan/read_write_type_checker.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_plan_read_write_typecheck mg-query)
|
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(query_plan_v2_create_set_remove_delete.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_v2_create_set_remove_delete mg-query mg-glue)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
|
|
|
add_unit_test(query_pretty_print.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_pretty_print mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2021-05-13 21:38:48 +08:00
|
|
|
add_unit_test(query_trigger.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_trigger mg-query mg-glue)
|
2021-05-13 21:38:48 +08:00
|
|
|
|
2021-05-14 21:38:59 +08:00
|
|
|
add_unit_test(query_serialization_property_value.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_serialization_property_value mg-query)
|
|
|
|
|
2021-06-22 14:43:19 +08:00
|
|
|
add_unit_test(query_streams.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_streams mg-query kafka-mock)
|
|
|
|
|
2022-04-21 21:45:31 +08:00
|
|
|
# Test query functions
|
|
|
|
add_unit_test(query_function_mgp_module.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_function_mgp_module mg-query)
|
|
|
|
target_include_directories(${test_prefix}query_function_mgp_module PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
|
|
|
|
2019-11-12 00:14:11 +08:00
|
|
|
# Test query/procedure
|
|
|
|
add_unit_test(query_procedure_mgp_type.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_procedure_mgp_type mg-query)
|
2019-11-12 00:14:11 +08:00
|
|
|
target_include_directories(${test_prefix}query_procedure_mgp_type PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
2019-11-14 22:54:10 +08:00
|
|
|
|
|
|
|
add_unit_test(query_procedure_mgp_module.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_procedure_mgp_module mg-query)
|
2019-11-14 22:54:10 +08:00
|
|
|
target_include_directories(${test_prefix}query_procedure_mgp_module PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
2020-02-11 23:19:30 +08:00
|
|
|
|
2021-01-21 22:47:56 +08:00
|
|
|
add_unit_test_with_custom_main(query_procedure_py_module.cpp)
|
2020-02-11 23:19:30 +08:00
|
|
|
target_link_libraries(${test_prefix}query_procedure_py_module mg-query)
|
|
|
|
target_include_directories(${test_prefix}query_procedure_py_module PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
2021-09-09 22:10:19 +08:00
|
|
|
|
|
|
|
add_unit_test(query_procedures_mgp_graph.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_procedures_mgp_graph mg-query storage_test_utils)
|
|
|
|
target_include_directories(${test_prefix}query_procedures_mgp_graph PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
2019-11-12 00:14:11 +08:00
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
# END query/procedure
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(query_profile.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_profile mg-query)
|
|
|
|
|
2018-08-16 16:13:04 +08:00
|
|
|
add_unit_test(query_required_privileges.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_required_privileges mg-query)
|
2018-08-16 16:13:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(query_semantic.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_semantic mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_variable_start_planner.cpp)
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
target_link_libraries(${test_prefix}query_variable_start_planner mg-query mg-glue)
|
2020-01-03 20:06:20 +08:00
|
|
|
|
|
|
|
add_unit_test(stripped.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}stripped mg-query)
|
2020-01-03 20:06:20 +08:00
|
|
|
|
|
|
|
add_unit_test(typed_value.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}typed_value mg-query)
|
2020-01-03 20:06:20 +08:00
|
|
|
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
# Test mg-communication
|
|
|
|
add_unit_test(bolt_chunked_decoder_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_chunked_decoder_buffer mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(bolt_chunked_encoder_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_chunked_encoder_buffer mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(bolt_decoder.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_decoder mg-communication)
|
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(bolt_encoder.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_encoder mg-communication mg-query)
|
|
|
|
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
add_unit_test(bolt_session.cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
target_link_libraries(${test_prefix}bolt_session mg-communication mg-utils)
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
|
|
|
|
add_unit_test(communication_buffer.cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
target_link_libraries(${test_prefix}communication_buffer mg-communication mg-utils)
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
|
|
|
|
add_unit_test(network_timeouts.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_timeouts mg-communication)
|
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
# Test mg-kvstore
|
|
|
|
add_unit_test(kvstore.cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
target_link_libraries(${test_prefix}kvstore mg-kvstore mg-utils)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
# Test data structures
|
|
|
|
add_unit_test(ring_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}ring_buffer mg-utils)
|
|
|
|
|
|
|
|
# Test mg-io
|
|
|
|
add_unit_test(network_endpoint.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_endpoint mg-io)
|
2018-10-04 21:23:07 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
add_unit_test(network_utils.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_utils mg-io)
|
|
|
|
|
2018-10-04 21:23:07 +08:00
|
|
|
add_unit_test(socket.cpp)
|
|
|
|
target_link_libraries(${test_prefix}socket mg-io)
|
2018-05-30 19:00:25 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
# Test mg-utils
|
2018-06-29 20:58:10 +08:00
|
|
|
add_unit_test(utils_algorithm.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_algorithm mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_exceptions.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_exceptions mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2019-02-14 17:34:09 +08:00
|
|
|
add_unit_test(utils_file.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_file mg-utils)
|
|
|
|
|
2019-01-17 20:46:01 +08:00
|
|
|
add_unit_test(utils_math.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_math mg-utils)
|
|
|
|
|
2019-04-29 22:02:08 +08:00
|
|
|
add_unit_test(utils_memory.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_memory mg-utils)
|
|
|
|
|
2021-02-23 03:51:46 +08:00
|
|
|
add_unit_test(utils_memory_tracker.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_memory_tracker mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_on_scope_exit.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_on_scope_exit mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
add_unit_test(utils_rwlock.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_rwlock mg-utils)
|
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(utils_scheduler.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_scheduler mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_signals.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_signals mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_string.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_string mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2019-07-22 20:19:35 +08:00
|
|
|
add_unit_test(utils_synchronized.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_synchronized mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_timestamp.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_timestamp mg-utils)
|
2018-01-15 19:19:55 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(skip_list.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list mg-utils)
|
|
|
|
|
|
|
|
add_unit_test(small_vector.cpp)
|
|
|
|
target_link_libraries(${test_prefix}small_vector mg-utils)
|
2018-07-27 16:54:20 +08:00
|
|
|
|
2020-11-04 21:31:14 +08:00
|
|
|
add_unit_test(utils_file_locker.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_file_locker mg-utils fmt)
|
|
|
|
|
2020-11-19 21:26:03 +08:00
|
|
|
add_unit_test(utils_thread_pool.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_thread_pool mg-utils fmt)
|
2018-10-15 17:01:57 +08:00
|
|
|
|
2021-03-19 00:24:25 +08:00
|
|
|
add_unit_test(utils_csv_parsing.cpp ${CMAKE_SOURCE_DIR}/src/utils/csv_parsing.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_csv_parsing mg-utils fmt)
|
2021-03-02 02:47:41 +08:00
|
|
|
|
2021-06-16 22:03:58 +08:00
|
|
|
add_unit_test(utils_async_timer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_async_timer mg-utils)
|
|
|
|
|
2021-09-30 01:14:39 +08:00
|
|
|
add_unit_test(utils_license.cpp)
|
2021-12-07 18:05:33 +08:00
|
|
|
target_link_libraries(${test_prefix}utils_license mg-utils mg-license)
|
2021-09-30 01:14:39 +08:00
|
|
|
|
|
|
|
add_unit_test(utils_settings.cpp)
|
2021-12-07 18:05:33 +08:00
|
|
|
target_link_libraries(${test_prefix}utils_settings mg-utils mg-settings)
|
2021-09-30 01:14:39 +08:00
|
|
|
|
2021-07-14 20:40:47 +08:00
|
|
|
add_unit_test(utils_temporal utils_temporal.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_temporal mg-utils)
|
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
# Test mg-storage-v2
|
|
|
|
add_unit_test(commit_log_v2.cpp)
|
2021-02-19 18:00:10 +08:00
|
|
|
target_link_libraries(${test_prefix}commit_log_v2 gflags mg-utils mg-storage-v2)
|
2019-06-26 22:01:51 +08:00
|
|
|
|
2019-07-01 15:32:25 +08:00
|
|
|
add_unit_test(property_value_v2.cpp)
|
2021-06-21 22:42:58 +08:00
|
|
|
target_link_libraries(${test_prefix}property_value_v2 mg-storage-v2 mg-utils)
|
2019-07-01 15:32:25 +08:00
|
|
|
|
2020-01-30 00:19:43 +08:00
|
|
|
add_unit_test(storage_v2.cpp)
|
2021-09-09 22:10:19 +08:00
|
|
|
target_link_libraries(${test_prefix}storage_v2 mg-storage-v2 storage_test_utils)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2019-08-20 20:59:13 +08:00
|
|
|
add_unit_test(storage_v2_constraints.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_constraints mg-storage-v2)
|
|
|
|
|
2019-09-18 21:59:57 +08:00
|
|
|
add_unit_test(storage_v2_decoder_encoder.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_decoder_encoder mg-storage-v2)
|
|
|
|
|
2019-10-01 19:42:27 +08:00
|
|
|
add_unit_test(storage_v2_durability.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_durability mg-storage-v2)
|
|
|
|
|
2019-07-08 21:10:05 +08:00
|
|
|
add_unit_test(storage_v2_edge.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_edge mg-storage-v2)
|
|
|
|
|
[StorageV2] Implement GC
Summary:
Here are some numbers from the benchmark:
```
(TOOLCHAIN) mtomic@poso:~/memgraph/build_release$ tests/benchmark/storage_v2_gc --num-threads 8
Config: NoGc, Time: 25.9836
Config: OnFinishGc, Time: 49.012
Config: 100msPeriodicGc, Time: 45.9856
Config: 1000msPeriodicGc, Time: 40.3094
```
```
(TOOLCHAIN) mtomic@poso:~/memgraph/build_release$ tests/benchmark/storage_v2_gc --num-threads 7
Config: NoGc, Time: 20.4256
Config: OnFinishGc, Time: 39.6669
Config: 100msPeriodicGc, Time: 30.7956
Config: 1000msPeriodicGc, Time: 35.128
```
It is not that bad if there is a core dedicated to doing garbage collection.
Reviewers: mferencevic, teon.banek
Reviewed By: mferencevic, teon.banek
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D2168
2019-07-09 22:34:23 +08:00
|
|
|
add_unit_test(storage_v2_gc.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_gc mg-storage-v2)
|
|
|
|
|
2019-07-25 23:11:45 +08:00
|
|
|
add_unit_test(storage_v2_indices.cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
target_link_libraries(${test_prefix}storage_v2_indices mg-storage-v2 mg-utils)
|
2019-07-25 23:11:45 +08:00
|
|
|
|
2019-07-18 22:17:41 +08:00
|
|
|
add_unit_test(storage_v2_name_id_mapper.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_name_id_mapper mg-storage-v2)
|
|
|
|
|
2019-12-23 19:43:43 +08:00
|
|
|
add_unit_test(storage_v2_property_store.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_property_store mg-storage-v2 fmt)
|
|
|
|
|
2019-10-25 21:22:17 +08:00
|
|
|
add_unit_test(storage_v2_wal_file.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_wal_file mg-storage-v2 fmt)
|
|
|
|
|
2020-10-27 17:11:43 +08:00
|
|
|
add_unit_test(storage_v2_replication.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_replication mg-storage-v2 fmt)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2021-06-14 21:47:57 +08:00
|
|
|
add_unit_test(storage_v2_isolation_level.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_v2_isolation_level mg-storage-v2)
|
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
add_unit_test(replication_persistence_helper.cpp)
|
|
|
|
target_link_libraries(${test_prefix}replication_persistence_helper mg-storage-v2)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
[E129-MG <-T0982-MG] implement edge type filtering (#489)
* GRANT, REVOKE, DENY and access_checker DONE
* Added AccessChecker to ExecutionContext
* grammar expanded; (#462)
* current
* T0954 mg expand user and role to hold permissions on labels (#465)
* added FineGrainedAccessPermissions class to model
* expanded user and role with fine grained access permissions
* fixed grammar
* [E129 < T0953-MG] GRANT, DENY, REVOKE added in interpreter and mainVisitor (#464)
* GRANT, DENY, REVOKE added in interpreter and mainVisitor
* Commented labelPermissons
* remove labelsPermission adding
* Fixed
* Removed extra lambda
* fixed
* [E129<-T0955-MG] Expand ExecutionContext with label related information (#467)
* added
* Added FineGrainedAccessChecker to Context
* fixed
* Added filtering
* testing
* Added edge filtering to storage, need to add filtering in simple Expand in operator.cpp
* Removed storage changes
* MATCH filtering working
* EdgeTypeFiltering working, just need to test everything again
* Removed FineGrainedAccessChecker
* Removed Expand Path
* Fix
* Tested FineGrainedAccessHandler, need to test AuthChecker
* Added integration test for lba
* Fixed merge conflicts
* PR fix
* fixed
* PR fix
* Fix test
* removed .vscode, .cache, .githooks
* githooks
* added tests
* fixed build
* Changed ast.lcp and User pointer to value in context.hpp
* Fixed test
* Remove denies on grant all
* AuthChecker
* Pr fix, auth_checker still not fixed
* Create mg-glue and extract UserBasedAuthChecker from AuthChecker
* Build fixed, need to fix test
* e2e tests
* e2e test working
* Added unit test, e2e and FineGrainedChecker
* Mege E129, auth_checker tests
* Fixed test
* e2e fix
Co-authored-by: Boris Taševski <36607228+BorisTasevski@users.noreply.github.com>
Co-authored-by: josipmrden <josip.mrden@external-basf.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@memgraph.io>
2022-08-16 21:57:23 +08:00
|
|
|
add_unit_test(auth_checker.cpp)
|
|
|
|
target_link_libraries(${test_prefix}auth_checker mg-glue mg-auth)
|
|
|
|
|
2022-08-31 18:14:16 +08:00
|
|
|
add_unit_test(auth_handler.cpp)
|
|
|
|
target_link_libraries(${test_prefix}auth_handler mg-glue mg-auth)
|
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
# Test mg-auth
|
|
|
|
if(MG_ENTERPRISE)
|
|
|
|
add_unit_test(auth.cpp)
|
|
|
|
target_link_libraries(${test_prefix}auth mg-auth mg-license)
|
2020-02-05 22:05:18 +08:00
|
|
|
endif()
|
2020-01-30 00:19:43 +08:00
|
|
|
|
|
|
|
# Test mg-slk
|
2022-07-07 19:30:28 +08:00
|
|
|
if(MG_ENTERPRISE)
|
|
|
|
add_unit_test(slk_advanced.cpp)
|
|
|
|
target_link_libraries(${test_prefix}slk_advanced mg-storage-v2)
|
2020-10-27 17:11:43 +08:00
|
|
|
endif()
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
if(MG_ENTERPRISE)
|
|
|
|
add_unit_test(slk_core.cpp)
|
|
|
|
target_link_libraries(${test_prefix}slk_core mg-slk gflags fmt)
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2022-07-07 19:30:28 +08:00
|
|
|
add_unit_test(slk_streams.cpp)
|
|
|
|
target_link_libraries(${test_prefix}slk_streams mg-slk gflags fmt)
|
2020-02-05 22:05:18 +08:00
|
|
|
endif()
|
2020-01-30 00:19:43 +08:00
|
|
|
|
|
|
|
# Test mg-rpc
|
2022-07-07 19:30:28 +08:00
|
|
|
if(MG_ENTERPRISE)
|
|
|
|
add_unit_test(rpc.cpp)
|
|
|
|
target_link_libraries(${test_prefix}rpc mg-rpc)
|
2020-02-05 22:05:18 +08:00
|
|
|
endif()
|
2020-01-30 00:19:43 +08:00
|
|
|
|
2018-10-15 17:01:57 +08:00
|
|
|
# Test LCP
|
2018-10-19 19:08:16 +08:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT test_lcp
|
2019-05-24 20:16:42 +08:00
|
|
|
DEPENDS ${lcp_src_files} lcp test_lcp.lisp
|
2018-10-19 19:08:16 +08:00
|
|
|
COMMAND sbcl --script ${CMAKE_CURRENT_SOURCE_DIR}/test_lcp.lisp)
|
|
|
|
add_custom_target(test_lcp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test_lcp)
|
2018-10-15 17:01:57 +08:00
|
|
|
add_test(test_lcp ${CMAKE_CURRENT_BINARY_DIR}/test_lcp)
|
|
|
|
add_dependencies(memgraph__unit test_lcp)
|
2021-06-24 16:39:35 +08:00
|
|
|
|
2022-02-03 20:37:55 +08:00
|
|
|
# Test websocket
|
|
|
|
find_package(Boost REQUIRED)
|
|
|
|
|
2022-08-08 20:49:48 +08:00
|
|
|
add_unit_test(monitoring.cpp)
|
|
|
|
target_link_libraries(${test_prefix}monitoring mg-communication Boost::headers)
|