forked from TrueCloudLab/frostfs-node
[#1972] node: Fix object format unit tests
Includes: 1. Unused func removal; 2. Err check of the `Sign` method. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
76b87c6d94
commit
3eb2ac985d
2 changed files with 4 additions and 12 deletions
|
@ -14,6 +14,8 @@ Changelog for NeoFS Node
|
|||
- Correctly select the shard for applying tree service operations (#1996)
|
||||
- Physical child object removal by GC (#1699)
|
||||
- Increase error counter for write-cache flush errors (#1818)
|
||||
- Broadcasting helper objects (#1972)
|
||||
- `neofs-cli lock object`'s `lifetime` flag handling (#1972)
|
||||
|
||||
### Removed
|
||||
### Updated
|
||||
|
|
|
@ -2,8 +2,6 @@ package object
|
|||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
|
@ -19,15 +17,6 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func testSHA(t *testing.T) [sha256.Size]byte {
|
||||
cs := [sha256.Size]byte{}
|
||||
|
||||
_, err := rand.Read(cs[:])
|
||||
require.NoError(t, err)
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
func blankValidObject(key *ecdsa.PrivateKey) *object.Object {
|
||||
var idOwner user.ID
|
||||
user.IDFromKey(&idOwner, key.PublicKey)
|
||||
|
@ -89,7 +78,8 @@ func TestFormatValidator_Validate(t *testing.T) {
|
|||
user.IDFromKey(&idOwner, ownerKey.PrivateKey.PublicKey)
|
||||
|
||||
tok := sessiontest.Object()
|
||||
tok.Sign(ownerKey.PrivateKey)
|
||||
err := tok.Sign(ownerKey.PrivateKey)
|
||||
require.NoError(t, err)
|
||||
|
||||
obj := object.New()
|
||||
obj.SetContainerID(cidtest.ID())
|
||||
|
|
Loading…
Reference in a new issue