feat: only persist cookies on app teardown

This commit is contained in:
James Houlahan
2020-12-16 15:45:37 +01:00
parent 7b4204591c
commit d3b0871cf1
7 changed files with 119 additions and 153 deletions

View File

@ -331,7 +331,6 @@ func mustMarshal(t *testing.T, v interface{}) []byte {
type fakeSettings struct {
*settings.Settings
dir string
}
// newFakeSettings creates a temporary folder for files.
@ -341,10 +340,7 @@ func newFakeSettings(rollout float64, earlyAccess bool) *fakeSettings {
panic(err)
}
s := &fakeSettings{
Settings: settings.New(dir),
dir: dir,
}
s := &fakeSettings{Settings: settings.New(dir)}
s.SetFloat64(settings.RolloutKey, rollout)