mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-07 16:03:13 +00:00
Update tests
This commit is contained in:
parent
f7a7e93ce3
commit
7179155651
@ -165,10 +165,10 @@ marketplacesuite "SP Slot Repair":
|
|||||||
|
|
||||||
test "repair from local and remote store",
|
test "repair from local and remote store",
|
||||||
NodeConfigs(
|
NodeConfigs(
|
||||||
clients: CodexConfigs
|
clients: CodexConfigs.init(nodes = 1)
|
||||||
.init(nodes = 1)
|
# .debug()
|
||||||
# .debug()
|
# .withLogTopics("node", "erasure")
|
||||||
.withLogTopics("node", "erasure").some,
|
.some,
|
||||||
providers: CodexConfigs.init(nodes = 3)
|
providers: CodexConfigs.init(nodes = 3)
|
||||||
# .debug()
|
# .debug()
|
||||||
# .withLogFile()
|
# .withLogFile()
|
||||||
@ -188,7 +188,7 @@ marketplacesuite "SP Slot Repair":
|
|||||||
totalSize = size.truncate(uint64),
|
totalSize = size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = size * collateralPerByte,
|
||||||
)
|
)
|
||||||
).get
|
).get
|
||||||
let availability1 = (
|
let availability1 = (
|
||||||
@ -196,14 +196,14 @@ marketplacesuite "SP Slot Repair":
|
|||||||
totalSize = size.truncate(uint64),
|
totalSize = size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = size * collateralPerByte,
|
||||||
)
|
)
|
||||||
).get
|
).get
|
||||||
discard await provider2.client.postAvailability(
|
discard await provider2.client.postAvailability(
|
||||||
totalSize = size.truncate(uint64),
|
totalSize = size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = size * collateralPerByte,
|
||||||
)
|
)
|
||||||
|
|
||||||
let purchaseId = await createPurchase(client0.client)
|
let purchaseId = await createPurchase(client0.client)
|
||||||
@ -227,7 +227,9 @@ marketplacesuite "SP Slot Repair":
|
|||||||
# Update the size of the availability for the SP 1,
|
# Update the size of the availability for the SP 1,
|
||||||
# he will repair and host the freed slot
|
# he will repair and host the freed slot
|
||||||
await provider0.client.patchAvailability(
|
await provider0.client.patchAvailability(
|
||||||
availability0.id, totalSize = (2 * size.truncate(uint64)).some
|
availability0.id,
|
||||||
|
totalSize = (2 * size.truncate(uint64)).some,
|
||||||
|
totalCollateral = (2 * size * collateralPerByte).some,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Let's free the slot to speed up the process
|
# Let's free the slot to speed up the process
|
||||||
@ -267,14 +269,14 @@ marketplacesuite "SP Slot Repair":
|
|||||||
totalSize = 2 * size.truncate(uint64),
|
totalSize = 2 * size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = 2 * size * collateralPerByte,
|
||||||
)
|
)
|
||||||
let availability1 = (
|
let availability1 = (
|
||||||
await provider1.client.postAvailability(
|
await provider1.client.postAvailability(
|
||||||
totalSize = size.truncate(uint64),
|
totalSize = size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = size * collateralPerByte,
|
||||||
)
|
)
|
||||||
).get
|
).get
|
||||||
|
|
||||||
@ -298,7 +300,7 @@ marketplacesuite "SP Slot Repair":
|
|||||||
totalSize = size.truncate(uint64),
|
totalSize = size.truncate(uint64),
|
||||||
duration = duration,
|
duration = duration,
|
||||||
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
minPricePerBytePerSecond = minPricePerBytePerSecond,
|
||||||
totalCollateral = 100 * size * collateralPerByte,
|
totalCollateral = size * collateralPerByte,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Let's disable the availability,
|
# Let's disable the availability,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user