[#42] container: Add failing tests for different epoch deletion
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
0b3ea05f76
commit
ab0a899a28
1 changed files with 26 additions and 0 deletions
|
@ -282,6 +282,32 @@ func TestContainerDelete(t *testing.T) {
|
||||||
c.InvokeFail(t, container.NotFoundError, "deletionInfo", id[:])
|
c.InvokeFail(t, container.NotFoundError, "deletionInfo", id[:])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("gas costs are the same for different epochs", func(t *testing.T) {
|
||||||
|
t.Skip()
|
||||||
|
|
||||||
|
_, cnt2 := addContainer(t, c, cBal)
|
||||||
|
args := []interface{}{cnt2.id[:], cnt2.sig, cnt2.pub, cnt2.token}
|
||||||
|
|
||||||
|
tx := c.PrepareInvoke(t, "delete", args...)
|
||||||
|
for _, e := range []int{126, 127, 128, 129, 65536} {
|
||||||
|
cNm.Invoke(t, stackitem.Null{}, "newEpoch", e)
|
||||||
|
|
||||||
|
// Sanity check.
|
||||||
|
s, err := cNm.TestInvoke(t, "epoch")
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, big.NewInt(int64(e)), s.Top().BigInt())
|
||||||
|
|
||||||
|
tx2 := c.PrepareInvoke(t, "delete", args...)
|
||||||
|
require.Equal(t, tx.Size(), tx2.Size())
|
||||||
|
require.Equal(t, tx.SystemFee, tx2.SystemFee)
|
||||||
|
require.Equal(t, tx.NetworkFee, tx2.NetworkFee)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Another sanity check: we want to test successful invocations,
|
||||||
|
// bad ones can trivially be equal.
|
||||||
|
c.Invoke(t, stackitem.Null{}, "delete", args...)
|
||||||
|
})
|
||||||
|
|
||||||
c.InvokeFail(t, container.NotFoundError, "get", cnt.id[:])
|
c.InvokeFail(t, container.NotFoundError, "get", cnt.id[:])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue