forked from TrueCloudLab/frostfs-node
[#1132] *: Use path/filepath
package when working with files
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0decb95591
commit
674f520da7
20 changed files with 73 additions and 77 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
|
@ -20,7 +19,7 @@ import (
|
|||
func Test_getKey(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
|
||||
wallPath := path.Join(dir, "wallet.json")
|
||||
wallPath := filepath.Join(dir, "wallet.json")
|
||||
w, err := wallet.NewWallet(wallPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -37,7 +36,7 @@ func Test_getKey(t *testing.T) {
|
|||
require.NoError(t, w.Save())
|
||||
w.Close()
|
||||
|
||||
keyPath := path.Join(dir, "binary.key")
|
||||
keyPath := filepath.Join(dir, "binary.key")
|
||||
rawKey, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, ioutil.WriteFile(keyPath, rawKey.Bytes(), os.ModePerm))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue