Skip to content
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

Ohm truncation strategy not working #4

Open
HoneyryderChuck opened this issue Sep 9, 2015 · 1 comment
Open

Ohm truncation strategy not working #4

HoneyryderChuck opened this issue Sep 9, 2015 · 1 comment

Comments

@HoneyryderChuck
Copy link

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).

@u2
Copy link

u2 commented Dec 23, 2015

I have tried DatabaseCleaner/database_cleaner#276 DatabaseCleaner/database_cleaner#277 , but they were not working.
Ohm.redis.call('FLUSHDB') is working for me.

@botandrose botandrose transferred this issue from DatabaseCleaner/database_cleaner Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants