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

liteserv binary doesn't use the ForestDB when specified via 'defaults' mac command #1062

Closed
ashvindersingh opened this issue Jan 26, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@ashvindersingh
Copy link

Steps to reproduce:

defaults write com.couchbase.LiteServ CBLStorageType ForestDB
  • cd into the unpacked binary location and find liteserv
  • Launch liteserv
./LiteServ --dir .

  • Create a db via REST API
PUT http://ashvinders-macbook-pro.local:59840/mydb

  • cd into the current database dir "mydb.cblite2"
  • Found the following file:
attachments/    db.sqlite3      db.sqlite3-shm  db.sqlite3-wal 
No ForestDB file found.
  • Rerun the command to verify ForestDB is set
defaults find ForestDB

Output of defaults command:

Snipped...
Found 2 keys in domain 'com.couchbase.LiteServ': {
    CBLStorage = ForestDB;
    CBLStorageType = ForestDB;
}
@snej
Copy link
Contributor

snej commented Jan 26, 2016

As I told Pasin, that only works with the bundled app version, not the command-line too. That's because the tool doesn't have a bundle ID so it doesn't have persistent defaults. Sorry!

I just added a --storage flag to the tool, but it's on the master branch (commit a804f01). If this is a testing blocker, you could ask Zack about getting it into 1.2.

@snej snej closed this as completed Jan 26, 2016
@zgramana
Copy link
Contributor

Go ahead and cherry pick it onto the release branch, since it doesn't require re-testing everything else.

@snej
Copy link
Contributor

snej commented Jan 26, 2016

Done: commit 99e4503 on release/1.2.0 branch

snej added a commit that referenced this issue Jan 26, 2016
Added some build settings that embed the LiteServ app's Info.plist in
the LiteServ tool's binary. This gives the binary a bundle ID of
com.couchbase.LiteServ like the app. That means it will honor user
defaults set in that domain by the 'defaults' tool, which can be useful
in testing.

Fixes #1062
@snej
Copy link
Contributor

snej commented Jan 26, 2016

I found a build setting that gives the tool a bundle ID so it will read user defaults set via the defaults tool, same as the app. I've applied it, on the master branch.

@ashvindersingh
Copy link
Author

Cool this is going to useful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants