mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
GODT-1364: Add windows CI machine for tests, and build
This commit is contained in:
@ -229,7 +229,10 @@ func (u *Users) MigrateCache(srcPath, dstPath string) error {
|
||||
// (read-only is conserved). Do copy instead.
|
||||
tmp, err := ioutil.TempFile(srcPath, "tmp")
|
||||
if err == nil {
|
||||
defer os.Remove(tmp.Name()) //nolint[errcheck]
|
||||
defer func() {
|
||||
tmp.Close() //nolint[errcheck]
|
||||
os.Remove(tmp.Name()) //nolint[errcheck]
|
||||
}()
|
||||
|
||||
if err := os.Rename(srcPath, dstPath); err == nil {
|
||||
return nil
|
||||
|
||||
@ -175,6 +175,7 @@ func initMocks(t *testing.T) mocks {
|
||||
|
||||
cacheFile, err := ioutil.TempFile("", "bridge-store-cache-*.db")
|
||||
r.NoError(t, err, "could not get temporary file for store cache")
|
||||
r.NoError(t, cacheFile.Close())
|
||||
|
||||
m := mocks{
|
||||
t: t,
|
||||
@ -201,6 +202,7 @@ func initMocks(t *testing.T) mocks {
|
||||
|
||||
dbFile, err := ioutil.TempFile(t.TempDir(), "bridge-store-db-*.db")
|
||||
r.NoError(t, err, "could not get temporary file for store db")
|
||||
r.NoError(t, dbFile.Close())
|
||||
|
||||
return store.New(
|
||||
sentryReporter,
|
||||
|
||||
Reference in New Issue
Block a user