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

Use NOTION_HOME for test sandbox #207

Closed
dherman opened this issue Dec 1, 2018 · 0 comments
Closed

Use NOTION_HOME for test sandbox #207

dherman opened this issue Dec 1, 2018 · 0 comments

Comments

@dherman
Copy link
Collaborator

dherman commented Dec 1, 2018

The sandboxing logic we use for testing is a bit messier than it could be. I think we can clean it up by eliminating the NOTION_SANDBOX env var and not changing HOME or USERPROFILE, and just use NOTION_HOME as the main hook for sandboxing.

Rough plan:

  • don't change HOME or USERPROFILE -- don't need to isolate behavior of tools we're delegating to
  • use NOTION_HOME as only sandboxing hook
    • unix: replaces ~/.notion
    • windows: replaces C:\Users\$username\AppData\Local\Notion
  • test sandbox should just set NOTION_HOME to $unique/.notion on all platforms
  • path::mod should define notion_home
    • if NOTION_HOME is set, use that
    • otherwise use default_notion_home()
  • path::$os should define default_notion_home
  • all the path functions should root off of notion_home()
  • eliminate NOTION_SANDBOX

It might be best to wait until #181 is done to implement this, since that touches these files a fair amount.

dherman added a commit to dherman/notion that referenced this issue Dec 1, 2018
dherman added a commit to dherman/notion that referenced this issue Dec 19, 2018
dherman added a commit to dherman/notion that referenced this issue Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant