mocked_config_test.go 578 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2016 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package api
  7. import (
  8. "github.com/syncthing/syncthing/lib/config/mocks"
  9. )
  10. func newMockedConfig() *mocks.Wrapper {
  11. m := &mocks.Wrapper{}
  12. m.ModifyReturns(noopWaiter{}, nil)
  13. m.RemoveFolderReturns(noopWaiter{}, nil)
  14. m.RemoveDeviceReturns(noopWaiter{}, nil)
  15. return m
  16. }
  17. type noopWaiter struct{}
  18. func (noopWaiter) Wait() {}