Skip to content

Commit

Permalink
Merge pull request #207 from ipfs-force-community/fix/replace-ioutil-…
Browse files Browse the repository at this point in the history
…with-os

fix: replace ioutil with os
  • Loading branch information
simlecode authored Jul 3, 2023
2 parents 52db683 + 4871bc5 commit 4013a55
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/journal/fsjournal/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package fsjournal

import (
"encoding/json"
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand All @@ -22,7 +21,7 @@ func TestFsJournal(t *testing.T) {
require.NoError(t, err)

dir := filepath.Join(lr.Path(), "journal")
require.NoError(t, ioutil.WriteFile(dir, []byte("file exists\n"), 0644))
require.NoError(t, os.WriteFile(dir, []byte("file exists\n"), 0644))

// stm: @VENUSMINER_JOURNAL_ENV_DISABLED_EVENTS_001
envDisableEvent := journal.EnvDisabledEvents()
Expand Down Expand Up @@ -63,7 +62,7 @@ func TestFsJournal(t *testing.T) {
t.Logf("Waiting record event...")

time.AfterFunc(time.Millisecond*100, func() {
recordEventData, err := ioutil.ReadFile(jlFile)
recordEventData, err := os.ReadFile(jlFile)
require.NoError(t, err)

event := &journal.Event{}
Expand Down

0 comments on commit 4013a55

Please sign in to comment.