check for both strategies in attribute inheritance test
This commit is contained in:
parent
bf3d648634
commit
cda0448611
|
@ -77,25 +77,33 @@ checksuite "Manifest":
|
||||||
|
|
||||||
|
|
||||||
suite "Manifest - Attribute Inheritance":
|
suite "Manifest - Attribute Inheritance":
|
||||||
let
|
proc makeProtectedManifest(strategy: StrategyType): Manifest =
|
||||||
base = Manifest.new(
|
Manifest.new(
|
||||||
treeCid = Cid.example,
|
manifest = Manifest.new(
|
||||||
blockSize = 1.MiBs,
|
treeCid = Cid.example,
|
||||||
datasetSize = 100.MiBs
|
blockSize = 1.MiBs,
|
||||||
)
|
datasetSize = 100.MiBs,
|
||||||
protected = Manifest.new(
|
),
|
||||||
manifest = base,
|
|
||||||
treeCid = Cid.example,
|
treeCid = Cid.example,
|
||||||
datasetSize = 200.MiBs,
|
datasetSize = 200.MiBs,
|
||||||
ecK = 1,
|
ecK = 1,
|
||||||
ecM = 1,
|
ecM = 1,
|
||||||
strategy = SteppedStrategy
|
strategy = strategy
|
||||||
)
|
)
|
||||||
verifiable = Manifest.new(
|
|
||||||
manifest = protected,
|
test "Should preserve interleaving strategy for protected manifest in verifiable manifest":
|
||||||
|
var verifiable = Manifest.new(
|
||||||
|
manifest = makeProtectedManifest(SteppedStrategy),
|
||||||
verifyRoot = Cid.example,
|
verifyRoot = Cid.example,
|
||||||
slotRoots = @[Cid.example, Cid.example]
|
slotRoots = @[Cid.example, Cid.example]
|
||||||
).tryGet()
|
).tryGet()
|
||||||
|
|
||||||
test "Should preserve interleaving strategy for protected manifest in verifiable manifest":
|
|
||||||
check verifiable.protectedStrategy == SteppedStrategy
|
check verifiable.protectedStrategy == SteppedStrategy
|
||||||
|
|
||||||
|
verifiable = Manifest.new(
|
||||||
|
manifest = makeProtectedManifest(LinearStrategy),
|
||||||
|
verifyRoot = Cid.example,
|
||||||
|
slotRoots = @[Cid.example, Cid.example]
|
||||||
|
).tryGet()
|
||||||
|
|
||||||
|
check verifiable.protectedStrategy == LinearStrategy
|
||||||
|
|
Loading…
Reference in New Issue