Skip to content

Commit

Permalink
replaces deprecated test function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Oct 2, 2022
1 parent 46ef9ac commit 0c64acc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3.0.0
with:
go-version: 1.19.0
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --disable lll --disable interfacer --disable gochecknoglobals
args: -v --disable lll --disable interfacer --disable gochecknoglobals
5 changes: 2 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"io/ioutil"
"log"
"os"
"path"
Expand Down Expand Up @@ -101,7 +100,7 @@ func TestPublicGithubRepositoryBackupWithBackupsToKeepAsOne(t *testing.T) {
// run
require.NoError(t, run())
// check only one bundle remains
files, err := ioutil.ReadDir(dfDir)
files, err := os.ReadDir(dfDir)
require.NoError(t, err)
var found int
for _, f := range files {
Expand Down Expand Up @@ -135,7 +134,7 @@ func TestPublicGithubRepositoryBackupWithBackupsToKeepUnset(t *testing.T) {
// run
require.NoError(t, run())
// check both bundles remain
files, err := ioutil.ReadDir(dfDir)
files, err := os.ReadDir(dfDir)
require.NoError(t, err)
require.Len(t, files, 2)
// reset
Expand Down

0 comments on commit 0c64acc

Please sign in to comment.