Skip to content

Commit

Permalink
split out sync from app services tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ironage committed Dec 19, 2023
1 parent 408b4a0 commit 429d17b
Show file tree
Hide file tree
Showing 18 changed files with 5,555 additions and 5,496 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ tsconfig.tsbuildinfo
# Baas remote host artifacts
baas-work-dir/
ssh_agent_commands.sh
baas/
4 changes: 2 additions & 2 deletions test/object-store/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if(REALM_ENABLE_AUTH_TESTS)
util/unit_test_transport.hpp
)
list(APPEND SOURCES
sync/app_non_sync_services.cpp
util/sync/baas_admin_api.cpp
util/unit_test_transport.cpp
)
Expand All @@ -61,7 +62,7 @@ if(REALM_ENABLE_SYNC)
)
list(APPEND SOURCES
bson.cpp
sync/app.cpp
sync/app_sync_services.cpp
sync/client_reset.cpp
sync/file.cpp
sync/flx_migration.cpp
Expand All @@ -86,7 +87,6 @@ elseif(REALM_APP_SERVICES)
util/sync/baas_admin_api.hpp
)
list(APPEND SOURCES
sync/app_services.cpp
util/sync/sync_test_utils.cpp
)
endif()
Expand Down
6 changes: 3 additions & 3 deletions test/object-store/audit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ TEST_CASE("audit integration tests", "[sync][pbs][audit][baas]") {
auto app_create_config = default_app_config();
app_create_config.schema = schema;
app_create_config.dev_mode_enabled = false;
TestAppSession session = create_app(app_create_config);
TestAppSession session(TestAppSession::Config{create_app(app_create_config)});

SyncTestFile config(session.app()->current_user(), bson::Bson("default"));
config.schema = schema;
Expand Down Expand Up @@ -1734,7 +1734,7 @@ TEST_CASE("audit integration tests", "[sync][pbs][audit][baas]") {
// Create an app which does not include AuditEvent in the schema so that
// things will break if audit tries to use it
app_create_config.schema = no_audit_event_schema;
TestAppSession session_2 = create_app(app_create_config);
TestAppSession session_2(TestAppSession::Config{create_app(app_create_config)});
SyncTestFile config(session_2.app()->current_user(), bson::Bson("default"));
config.schema = no_audit_event_schema;
config.audit_config = std::make_shared<AuditConfig>();
Expand Down Expand Up @@ -1793,7 +1793,7 @@ TEST_CASE("audit integration tests", "[sync][pbs][audit][baas]") {

SECTION("AuditEvent missing from server schema") {
app_create_config.schema = no_audit_event_schema;
TestAppSession session_2 = create_app(app_create_config);
TestAppSession session_2(TestAppSession::Config{create_app(app_create_config)});
SyncTestFile config(session_2.app()->current_user(), bson::Bson("default"));
config.schema = no_audit_event_schema;
config.audit_config = std::make_shared<AuditConfig>();
Expand Down
2 changes: 1 addition & 1 deletion test/object-store/c_api/c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5711,7 +5711,7 @@ TEST_CASE("C API app: link_user integration w/c_api transport", "[sync][app][c_a
auto user_data = new TestTransportUserData();
auto http_transport = realm_http_transport_new(send_request_to_server, user_data, user_data_free);
auto app_session = get_runtime_app_session();
TestAppSession session(app_session, *http_transport, DeleteApp{false});
TestAppSession session({app_session, *http_transport, DeleteApp{false}});
realm_app app(session.app());

SECTION("remove_user integration") {
Expand Down
Loading

0 comments on commit 429d17b

Please sign in to comment.