Skip to content

Investigate separating out test database methods #1304

Open
@ethowitz

Description

@ethowitz

With our work to split syncstorage-rs into separate crates, we have removed #[cfg(test)] from those database methods that are only included in tests. (Code specific to the test feature is not visible to external crates, so we had to remove the cfg(test) attribute from the test methods in the Db trait.) This isn't ideal, since it makes it easy to accidentally use methods that were intended only for testing purposes.

There are a few approaches we could take to resolve this:

  • Move the methods to a separate DbTest trait
  • Add our own syncstorage-test feature that we use to handle test code
  • Add comments that explain the nature of the test methods
  • Use the #[deprecated] attribute on the test methods so they generated warnings if used in non-test code

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

No one assigned

    Labels

    5Estimate - l - Moderately complex, will require some effort but clearly defined.cleanup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions