mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
GODT-2291: Change gluon store default location from Cache to Data.
This commit is contained in:
@ -88,28 +88,21 @@ func (s *scenario) theUserChangesTheGluonPath() error {
|
||||
}
|
||||
|
||||
func (s *scenario) theUserDeletesTheGluonFiles() error {
|
||||
if path, err := s.t.locator.ProvideGluonCachePath(); err != nil {
|
||||
return fmt.Errorf("failed to get gluon cache path: %w", err)
|
||||
if path, err := s.t.locator.ProvideGluonDataPath(); err != nil {
|
||||
return fmt.Errorf("failed to get gluon Data path: %w", err)
|
||||
} else if err := os.RemoveAll(path); err != nil {
|
||||
return fmt.Errorf("failed to remove gluon cache path: %w", err)
|
||||
return fmt.Errorf("failed to remove gluon Data path: %w", err)
|
||||
}
|
||||
|
||||
if path, err := s.t.locator.ProvideGluonConfigPath(); err != nil {
|
||||
return fmt.Errorf("failed to get gluon config path: %w", err)
|
||||
} else if err := os.RemoveAll(path); err != nil {
|
||||
return fmt.Errorf("failed to remove gluon config path: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
return s.theUserDeletesTheGluonCache()
|
||||
}
|
||||
|
||||
func (s *scenario) theUserDeletesTheGluonCache() error {
|
||||
if path, err := s.t.locator.ProvideGluonCachePath(); err != nil {
|
||||
return fmt.Errorf("failed to get gluon cache path: %w", err)
|
||||
if path, err := s.t.locator.ProvideGluonDataPath(); err != nil {
|
||||
return fmt.Errorf("failed to get gluon Cache path: %w", err)
|
||||
} else if err := os.RemoveAll(path); err != nil {
|
||||
return fmt.Errorf("failed to remove gluon cache path: %w", err)
|
||||
return fmt.Errorf("failed to remove gluon Cache path: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ func (t *testCtx) initBridge() (<-chan events.Event, error) {
|
||||
}
|
||||
|
||||
// Get the default gluon path.
|
||||
gluonCacheDir, err := t.locator.ProvideGluonCachePath()
|
||||
gluonCacheDir, err := t.locator.ProvideGluonDataPath()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get gluon dir: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user