fix tests

This commit is contained in:
Dmitriy Ryajov 2022-03-16 15:48:17 -06:00
parent b1264a9c87
commit 39b54a96d8
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
2 changed files with 5 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import ./helpers
suite "Manifest":
test "Should produce valid tree hash checksum":
without var manifest =? Manifest.init(
var manifest = Manifest.new(
blocks = @[
Block.init("Block 1".toBytes).tryGet().cid,
Block.init("Block 2".toBytes).tryGet().cid,
@ -24,8 +24,7 @@ suite "Manifest":
Block.init("Block 5".toBytes).tryGet().cid,
Block.init("Block 6".toBytes).tryGet().cid,
Block.init("Block 7".toBytes).tryGet().cid,
]):
fail()
]).tryGet()
let
checksum = @[18.byte, 32, 227, 176, 196, 66, 152,
@ -47,7 +46,7 @@ suite "Manifest":
)
var
blocksManifest = Manifest.init(blocks).tryGet()
blocksManifest = Manifest.new(blocks).tryGet()
let
e = blocksManifest.encode().tryGet()

View File

@ -56,7 +56,7 @@ suite "Test Node":
storeFut = node.store(stream)
var
manifest = Manifest.init().tryGet()
manifest = Manifest.new().tryGet()
try:
while (
@ -84,7 +84,7 @@ suite "Test Node":
test "Retrieve Data Stream":
var
manifest = Manifest.init().tryGet()
manifest = Manifest.new().tryGet()
original: seq[byte]
while (