Skip to content

Commit

Permalink
updater: imp test
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Nov 22, 2024
1 parent c9efb41 commit 872cd3a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/updater/updater_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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"))
Expand All @@ -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)
Expand All @@ -111,6 +110,6 @@ func TestUpdater_internal(t *testing.T) {
require.NoError(t, err)

assert.Equal(t, "AdGuardHome.yaml", string(d))
})
}))
}
}

0 comments on commit 872cd3a

Please sign in to comment.