From 78fe89e6b02da4e663ea7938dd246fb557885640 Mon Sep 17 00:00:00 2001 From: Rosie Kern Date: Tue, 29 Oct 2024 15:54:21 +0000 Subject: [PATCH] Delint and rename dgutdb.go to dgutadb.go --- server/{dgutdb.go => dgutadb.go} | 0 server/server_test.go | 3 ++- server/tree.go | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) rename server/{dgutdb.go => dgutadb.go} (100%) diff --git a/server/dgutdb.go b/server/dgutadb.go similarity index 100% rename from server/dgutdb.go rename to server/dgutadb.go diff --git a/server/server_test.go b/server/server_test.go index 5f541be..7460f54 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -674,7 +674,7 @@ func TestServer(t *testing.T) { subdirs, err = decodeSubdirResult(response) So(err, ShouldBeNil) - So(len(subdirs), ShouldEqual, 34) + So(len(subdirs), ShouldEqual, 17) response, err = query(s, EndPointBasedirHistory, fmt.Sprintf("?id=%d&basedir=%s", usageGroup[0].GID, usageGroup[0].BaseDir)) @@ -940,6 +940,7 @@ func testClientsOnRealServer(t *testing.T, username, uid string, gids []string, expectedMtime := "1970-01-01T00:01:30Z" const numRootDirectories = 13 + const numADirectories = 12 const directorySize = 1024 diff --git a/server/tree.go b/server/tree.go index 9abc73e..4d6df2f 100644 --- a/server/tree.go +++ b/server/tree.go @@ -165,7 +165,8 @@ func (s *Server) getTree(c *gin.Context) { // has to do additional database queries to find out if di's children have // children. If results don't belong to at least one of the allowedGIDs, they // will be marked as NoAuth and won't include child info. -func (s *Server) diToTreeElement(di *dguta.DirInfo, filter *dguta.Filter, allowedGIDs map[uint32]bool, path string) *TreeElement { +func (s *Server) diToTreeElement(di *dguta.DirInfo, filter *dguta.Filter, + allowedGIDs map[uint32]bool, path string) *TreeElement { if di == nil { return &TreeElement{Path: path} }