-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Failing tests on ToMany relations while working with enums #179
Comments
Hey there @tarnowsc, sorry I didn't get back to you sooner I was on vacation. I'll have to look into this one in more detail to see exactly the cause. Thanks for filing the issue. |
Hey @tarnowsc, so I looked into this issue and can solve one of the errors with a fix to the randomize package that should have always been in there. However one of the tests assumes that it can always insert four associated values in order to test the given functionality. There's actually no ability to fix that without sacrificing some of the integrity of the test, since it wants to deal in multples (these are set operations after all, and we don't want to assume that behavior for n will be the same behavior for 1). But even then it'd only work for enums with length 2, and it's possible to have an enum of length 1. I'm unclear on what else we can do at this moment. It seems like if we don't slim down the relationship set helper tests, there's no way we can have a database like this fully pass. Are you okay with this solution? I wish I could do better and like I said I'm opened to other ideas. |
Hi @aarondl , sorry for late response I was also on vacation. I've solved this by turning off those tests and was hoping for some bright idea, but as you wrote there is no easy fix. |
Let me just keep this one opened. There is at least one bug here that fixes one of the issues. Will fix that. |
soo any fix for this? I'm facing this right now |
I'm having trouble with SQLBoiler v2.5.0, working with postgres. This is my db schema:
While running generated tests, I'm getting failures on relations:
Tests on Users relation to UsersRoles violates the uniqueness of primary key on users_roles table. Probably the entropy of enum is too low to avoid the collision. While extending the enum by new values the probability of fail decreases, nevertheless that is not a solution.
The text was updated successfully, but these errors were encountered: