Comments (4)
After seeing how Ecto.Adapters.SQL.Sandbox
works I figured how to run the tests I wanted.
The solution was to tag the test as async: false
and in the setup of said test using :ok = Ecto.Adapters.SQL.Sandbox.mode(MyApp.Repo, :auto)
from triplex.
Try the option described here
That worked for me.
I decided to ignore tests to check if Triplex.create works because that's essentially testing the module again.
from triplex.
Yes, for the first tenant creation that works, the problem is that the application needs to create a tenant on demand from a request. That's what I'm testing.
from triplex.
Same issue I had.
I just resolved that "If it can make one, it can make another if I pass the right params" so instead of testing Tenant.create, I test my logic that handles that request.
It's sort of like testing GenServer calls and not the entire GenServer process. I know it's limiting but it works.
from triplex.
Related Issues (20)
- cast_assoc is not saving prefix. HOT 4
- Failing to Fetch and Insert into Tenant table HOT 1
- function Mix.Project.deps_paths/0 is undefined (module Mix.Project is not available) with Edeliver HOT 2
- Ecto 3 Support HOT 8
- Do not use Ecto's private APIs HOT 1
- Extract plugs to another lib HOT 5
- Mariaex.Error on 1.3.0-rc.0 HOT 1
- Migrating on existing tenants in Production HOT 6
- Release 1.3? HOT 2
- Investigate the dynamic repo's idea HOT 2
- `mix triplex.migrate` didn't migrate public HOT 2
- Looking for a top level `rollback` function like `Triplex.migrate/2` HOT 4
- Triplex.all should not return prefixes HOT 14
- Does Tripex support the new MyXQL package? HOT 1
- cross schema relation in migration. is it possible to foreign key of a table from public schema to tenant schema in postgresql? HOT 5
- Bug: Triplex.all/1 does not consider tenant_prefix HOT 2
- Running tenant migrations without Mix for apps deployed via mix release HOT 4
- New release on hex.pm? HOT 4
- Triplex.create fails with extremely cryptic error message using OTP 24.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from triplex.