updater: imp test

This commit is contained in:
Eugene Burkov 2024-11-22 19:09:18 +03:00
parent c9efb412e7
commit 872cd3a18c
1 changed files with 3 additions and 4 deletions

View File

@ -46,7 +46,7 @@ func TestUpdater_internal(t *testing.T) {
for _, tc := range testCases {
exePath := filepath.Join(wd, tc.exeName)
// start server for returning package file
// Start server for returning package file.
pkgData, err := os.ReadFile(filepath.Join("testdata", tc.archiveName))
require.NoError(t, err)
@ -76,7 +76,6 @@ func TestUpdater_internal(t *testing.T) {
u.clean()
// Consider the following subtest necessary.
require.True(t, t.Run("backup", func(t *testing.T) {
var d []byte
d, err = os.ReadFile(filepath.Join(wd, "agh-backup", "AdGuardHome.yaml"))
@ -90,7 +89,7 @@ func TestUpdater_internal(t *testing.T) {
assert.Equal(t, tc.exeName, string(d))
}))
t.Run("updated", func(t *testing.T) {
require.True(t, t.Run("updated", func(t *testing.T) {
var d []byte
d, err = os.ReadFile(exePath)
require.NoError(t, err)
@ -111,6 +110,6 @@ func TestUpdater_internal(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, "AdGuardHome.yaml", string(d))
})
}))
}
}