From c3ceb376d8e841b1b76244b89833ea3f3e98de43 Mon Sep 17 00:00:00 2001 From: Daniel Milde Date: Sat, 10 Feb 2024 10:16:15 +0100 Subject: [PATCH] test: cover GetParent --- pkg/analyze/stored_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/analyze/stored_test.go b/pkg/analyze/stored_test.go index 087f2d966..913c1748f 100644 --- a/pkg/analyze/stored_test.go +++ b/pkg/analyze/stored_test.go @@ -102,4 +102,9 @@ func TestRemoveStoredFile(t *testing.T) { assert.Equal(t, 4, stored.GetItemCount()) assert.Equal(t, int64(5+4096*3), stored.GetSize()) + + file := stored.GetFiles()[0].GetFiles()[0].GetFiles()[0] + assert.Equal(t, false, file.IsDir()) + assert.Equal(t, "file", file.GetName()) + assert.Equal(t, "test_dir/nested/subnested", file.GetParent().GetPath()) }