-
Notifications
You must be signed in to change notification settings - Fork 4
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
Doesn't pass the PouchDB test suite #7
Comments
Can you please post the full error log? I tried to setup the test quickly but it turns out I have to set up CouchDB too, can't do that now. It's probably something trivial. |
Sorry, forgot that detail! You can also run a PouchDB Server backed by medeadown instead, but often it's easier to use CouchDB for debugging. And you're right; the fix is easy. It looks like medeadown doesn't create a new database if the file isn't found?
|
Yes. I also met this issue once, I think it's a matter of mkdir vs mkdirp, but I solved it in my app instead of in Medea. It does make sense, Medea should not be expected to auto-create the directory the data should reside in. Unless of course LevelDB does that. |
LevelDB does. :) In fact, the PouchDB test suite passes against LevelDOWN, MemDOWN, level.js, localstorage-down, riakdown, and redisdown. So medeadown would be joining the crowd. :D |
Well from these only LevelDOWN uses the FS directly. But yes, I agree, a mkdirp should get in there. Update: it's weird though, just looked into Medea and it does mkdirp the directory. So no idea what goes wrong. Maybe medeadown does not go through medea's open procedure. Update 2: looking at MedeaDOWN.prototype._open, it first calls leveldown-open and then medea's open which creates the dir (as expected). The error is emitted in leveldown-open. So the problem is not in medea, it's in medeadown. |
Steps to repro:
Fails on the very first test with
Uncaught AssertionError: expected {} to not exist
. My hunch is that this is due to MedeaDOWN not exporting a LevelDOWN-compatible API in the same way that most *down adapters do, but I haven't investigated yet. This issue is just a heads-up in case you're curious and want to investigate. 😃For more info about how to set up your project to run the PouchDB test suite (e.g. in Travis) and how to debug, check out this guide. *down adapters that are known to pass the test include LevelDOWN, MemDOWN, localstorage-down, level-js, riakdown, and redisdown.
The text was updated successfully, but these errors were encountered: