Skip to content

Instantly share code, notes, and snippets.

@joerx
Created August 25, 2015 05:09
Show Gist options
  • Save joerx/7cc6515c81ccddd683c5 to your computer and use it in GitHub Desktop.
Save joerx/7cc6515c81ccddd683c5 to your computer and use it in GitHub Desktop.
Forcing sails to use memory adapter during tests
// Occassionally one needs to manually force sails to use the built-in memory adapter as a session store
// - for instance when running tests and a mysql-adapter is configured for production, we may need to
// override session adapter settings for tests only. Turns out to be pretty simple:
Sails.lift({
session: {
adapter: 'memory',
config: null
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment