Skip to content

Ohm truncation strategy not working #4

Description

@HoneyryderChuck

I have truncation strategy set (also clean_with(:truncation)). Nothing is being cleaned. I think this is a bug. See:

https://github.com/DatabaseCleaner/database_cleaner/blob/master/lib/database_cleaner/generic/truncation.rb#L13

Here one is initiating an array, which in my case is empty, as I'm not setting the option (anyways, there are no tables in a key-value store). Anyway, look at the following code:

https://github.com/DatabaseCleaner/database_cleaner/blob/master/lib/database_cleaner/redis/truncation.rb#L15

Here one sets the condition on the @tables_to_exclude variable directly. This will always be true, as the variable is not nil (empty array is not a negative condition).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions