From daa26f6e9b6920fce3a0b7730a53bf8ee97d0fd3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 26 Apr 2023 17:30:26 +0300 Subject: [PATCH] [#288] pilorama/test: Check operation order for TreeGetByPath() Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/pilorama/forest_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/local_object_storage/pilorama/forest_test.go b/pkg/local_object_storage/pilorama/forest_test.go index 94b14457a..caa999f94 100644 --- a/pkg/local_object_storage/pilorama/forest_test.go +++ b/pkg/local_object_storage/pilorama/forest_test.go @@ -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)