[#288] pilorama/test: Check operation order for TreeGetByPath()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
d4e30884a5
commit
9f29408695
1 changed files with 4 additions and 0 deletions
|
@ -322,6 +322,10 @@ func testForestTreeAddByPath(t *testing.T, s Forest) {
|
|||
firstID := lm[2].Child
|
||||
testMeta(t, s, cid, treeID, firstID, lm[2].Parent, Meta{Time: lm[2].Time, Items: meta})
|
||||
|
||||
// TreeAddByPath must return operations in increasing time order.
|
||||
require.True(t, lm[0].Time < lm[1].Time)
|
||||
require.True(t, lm[1].Time < lm[2].Time)
|
||||
|
||||
meta[0].Value = []byte("YYY")
|
||||
lm, err = s.TreeAddByPath(context.Background(), d, treeID, AttributeFilename, []string{"path", "to"}, meta)
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Reference in a new issue