Replies: 1 comment 8 replies
-
If you set a breakpoint in your controller, can you confirm that the User connection goes to the same shard where you created test data? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using
shard_resolver
of Rails to handle switching database for Rails.When I create a data test, I need to switch database connection and then create data.
I can get the record with the variable
tenant_1_user
, but in the controller (I am using request test), I runthere is no user.
Is there anyway to do test for
shard_resolver
at the moment? If not, I guess I need to create test data to the database instead of memoryBeta Was this translation helpful? Give feedback.
All reactions