From a4c0303d899361ff2fffaffa620877d0ff2c8fcf Mon Sep 17 00:00:00 2001 From: Eduardo Berrocal Date: Sun, 7 May 2023 00:17:36 -0700 Subject: [PATCH] virtcontainers: Fixed static checks for improved test coverage for fc.go Expanded tests on fc_test.go to cover more lines of code. Coverage went from 4.6% to 18.5%. Fixed very simple static check fail on line 202. Fixes: #266 Signed-off-by: Eduardo Berrocal --- src/runtime/virtcontainers/fc_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/runtime/virtcontainers/fc_test.go b/src/runtime/virtcontainers/fc_test.go index 361ca0962..5550b6895 100644 --- a/src/runtime/virtcontainers/fc_test.go +++ b/src/runtime/virtcontainers/fc_test.go @@ -199,8 +199,7 @@ func TestFCGetTotalMemoryMB(t *testing.T) { fc := firecracker{} ctx := context.Background() - var initialMemSize uint32 - initialMemSize = 1024 + var initialMemSize uint32 = 1024 fc.config.MemorySize = 1024 memSize := fc.GetTotalMemoryMB(ctx)