Pull request: all: fix windows tempdir

Merge in DNS/adguard-home from try-fixing-windows-tests to master

Squashed commit of the following:

commit 25a43db5d53f24b98921efa21d8d2f231992e761
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Mar 26 21:19:00 2021 +0300

    all: fix windows tempdir
This commit is contained in:
Ainar Garipov
2021-03-29 11:40:04 +03:00
parent 179b76da77
commit ffb503976b
7 changed files with 48 additions and 135 deletions

View File

@@ -100,7 +100,7 @@ func TestUpdateGetVersion(t *testing.T) {
}
func TestUpdate(t *testing.T) {
wd := aghtest.PrepareTestDir(t)
wd := t.TempDir()
assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome"), []byte("AdGuardHome"), 0o755))
assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644))
@@ -166,7 +166,7 @@ func TestUpdate(t *testing.T) {
}
func TestUpdateWindows(t *testing.T) {
wd := aghtest.PrepareTestDir(t)
wd := t.TempDir()
assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "AdGuardHome.exe"), []byte("AdGuardHome.exe"), 0o755))
assert.Nil(t, ioutil.WriteFile(filepath.Join(wd, "README.md"), []byte("README.md"), 0o644))