forked from TrueCloudLab/frostfs-api-go
[#140] sdk: Refactor reference types
Refactor v2-compatible reference types to be wrappers over corresponding types from v2. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2026473733
commit
524280a5e8
10 changed files with 73 additions and 215 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func TestIDV2(t *testing.T) {
|
||||
id := new(ID)
|
||||
id := NewID()
|
||||
|
||||
checksum := [sha256.Size]byte{}
|
||||
|
||||
|
@ -20,8 +20,5 @@ func TestIDV2(t *testing.T) {
|
|||
|
||||
idV2 := id.ToV2()
|
||||
|
||||
id2, err := IDFromV2(idV2)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, id, id2)
|
||||
require.Equal(t, checksum[:], idV2.GetValue())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue