8000 Add unit test for MigrationStore by michael-wb · Pull Request #6495 · realm/realm-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add unit test for MigrationStore #6495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 13, 2023
Merged

Conversation

michael-wb
Copy link
Contributor
@michael-wb michael-wb commented Apr 12, 2023

What, How & Why?

Added unit test for the MigrationStore class to the flx_migration object store tests.

#6392

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • [ ] C-API, if public C++ API changed.

@danieltabacaru
Copy link
Collaborator

I think you hit the same issue (No such table exists) I did while I was implementing the client reset logic. Unfortunately, I didn't find out what is causing it.

REQUIRE(table_sub->name == sub_name);
}

TEST_CASE("Migration store", "[flx][migration]") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since these are not integration tests and are logically separated from the rest of the tests, maybe they should be in their own file (i.e, migration_store_test.cpp)

@@ -116,7 +116,8 @@ bool MigrationStore::is_migrated()
void MigrationStore::complete_migration()
{
// Ensure the migration table has been initialized
REALM_ASSERT(load_data());
bool loaded = load_data();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Collaborator
@danieltabacaru danieltabacaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbreams
Copy link
Contributor
jbreams commented Apr 13, 2023

🚢 🇮🇹

@michael-wb michael-wb merged commit ef860e7 into master Apr 13, 2023
@michael-wb michael-wb deleted the mwb/migration-store-unittest branch April 13, 2023 15:11
@michael-wb michael-wb linked an issue Apr 13, 2023 that may be closed by this pull request
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit test for MigrationStore
4 participants
0