From 872cd3a18c876076ea643624336cfc0a4296a81d Mon Sep 17 00:00:00 2001 From: Eugene Burkov Date: Fri, 22 Nov 2024 19:09:18 +0300 Subject: [PATCH] updater: imp test --- internal/updater/updater_internal_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/updater/updater_internal_test.go b/internal/updater/updater_internal_test.go index 362699e0..67c16dc1 100644 --- a/internal/updater/updater_internal_test.go +++ b/internal/updater/updater_internal_test.go @@ -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)) - }) + })) } }