diff --git a/internal/app/wwctl/clean/main_test.go b/internal/app/wwctl/clean/main_test.go index 6396e8bd..6703813f 100644 --- a/internal/app/wwctl/clean/main_test.go +++ b/internal/app/wwctl/clean/main_test.go @@ -5,11 +5,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/warewulf/warewulf/internal/pkg/testenv" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) func Test_Clean(t *testing.T) { - wwlog.SetLogLevel(wwlog.DEBUG) env := testenv.New(t) env.WriteFile(t, "etc/warewulf/nodes.conf", `nodeprofiles: {} diff --git a/internal/app/wwctl/node/set/main_test.go b/internal/app/wwctl/node/set/main_test.go index 3058933d..269a95eb 100644 --- a/internal/app/wwctl/node/set/main_test.go +++ b/internal/app/wwctl/node/set/main_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/warewulf/warewulf/internal/pkg/testenv" "github.com/warewulf/warewulf/internal/pkg/warewulfd" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) type test_description struct { @@ -22,7 +21,6 @@ type test_description struct { func run_test(t *testing.T, test test_description) { env := testenv.New(t) defer env.RemoveAll(t) - wwlog.SetLogLevel(wwlog.DEBUG) env.WriteFile(t, "etc/warewulf/nodes.conf", test.inDB) warewulfd.SetNoDaemon() name := test.name diff --git a/internal/app/wwctl/profile/set/main_test.go b/internal/app/wwctl/profile/set/main_test.go index ef677dd3..0cdc1ff6 100644 --- a/internal/app/wwctl/profile/set/main_test.go +++ b/internal/app/wwctl/profile/set/main_test.go @@ -8,7 +8,6 @@ import ( "github.com/warewulf/warewulf/internal/pkg/testenv" "github.com/warewulf/warewulf/internal/pkg/warewulfd" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) type test_description struct { @@ -23,7 +22,6 @@ type test_description struct { func run_test(t *testing.T, test test_description) { env := testenv.New(t) defer env.RemoveAll(t) - wwlog.SetLogLevel(wwlog.DEBUG) env.WriteFile(t, "etc/warewulf/nodes.conf", test.inDB) warewulfd.SetNoDaemon() name := test.name diff --git a/internal/pkg/container/shimgrub_test.go b/internal/pkg/container/shimgrub_test.go index 0ff207f1..8921b165 100644 --- a/internal/pkg/container/shimgrub_test.go +++ b/internal/pkg/container/shimgrub_test.go @@ -8,13 +8,11 @@ import ( "github.com/stretchr/testify/assert" warewulfconf "github.com/warewulf/warewulf/internal/pkg/config" "github.com/warewulf/warewulf/internal/pkg/testenv" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) func Test_Find_ShimX86(t *testing.T) { testenv.New(t) conf := warewulfconf.Get() - wwlog.SetLogLevel(wwlog.DEBUG) _ = os.MkdirAll(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/lib64/efi/"), 0755) shimF, err := os.Create(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/lib64/efi/shim.efi")) assert.NoError(t, err) @@ -26,7 +24,6 @@ func Test_Find_ShimX86(t *testing.T) { func Test_Find_ShimArch64(t *testing.T) { testenv.New(t) conf := warewulfconf.Get() - wwlog.SetLogLevel(wwlog.DEBUG) _ = os.MkdirAll(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/aarch64"), 0755) shimF, err := os.Create(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/aarch64/shim.efi")) assert.NoError(t, err) @@ -38,7 +35,6 @@ func Test_Find_ShimArch64(t *testing.T) { func Test_Find_GrubX86(t *testing.T) { testenv.New(t) conf := warewulfconf.Get() - wwlog.SetLogLevel(wwlog.DEBUG) _ = os.MkdirAll(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/x86_64"), 0755) shimF, err := os.Create(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/x86_64/grub.efi")) assert.NoError(t, err) @@ -50,7 +46,6 @@ func Test_Find_GrubX86(t *testing.T) { func Test_Find_GrubAarch64(t *testing.T) { testenv.New(t) conf := warewulfconf.Get() - wwlog.SetLogLevel(wwlog.DEBUG) _ = os.MkdirAll(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/aarch64/"), 0755) shimF, err := os.Create(path.Join(conf.Paths.WWChrootdir, "suse/rootfs/usr/share/efi/aarch64/grub.efi")) assert.NoError(t, err) diff --git a/internal/pkg/node/constructors_test.go b/internal/pkg/node/constructors_test.go index b40f9efb..a465164f 100644 --- a/internal/pkg/node/constructors_test.go +++ b/internal/pkg/node/constructors_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/warewulf/warewulf/internal/pkg/wwlog" "gopkg.in/yaml.v3" ) @@ -196,7 +195,6 @@ nodes: var ymlSrc NodesYaml err := yaml.Unmarshal([]byte(nodesconf), &ymlSrc) assert.NoError(err) - wwlog.SetLogLevel(wwlog.DEBUG) nodes, err := ymlSrc.FindAllNodes() assert.NoError(err) nodemap := make(map[string]*Node) diff --git a/internal/pkg/node/util_test.go b/internal/pkg/node/util_test.go index ecbc4fef..eb804453 100644 --- a/internal/pkg/node/util_test.go +++ b/internal/pkg/node/util_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/warewulf/warewulf/internal/pkg/wwlog" "gopkg.in/yaml.v3" ) @@ -92,7 +91,6 @@ func Test_nodeYaml_FindByHwaddr(t *testing.T) { } func Test_nodeYaml_FindByIpaddr(t *testing.T) { - wwlog.SetLogLevel(wwlog.DEBUG) c, err := NewUtilTestNode() assert.NoError(t, err) type args struct { diff --git a/internal/pkg/overlay/funcmap_test.go b/internal/pkg/overlay/funcmap_test.go index 641bc50e..a4fbbef7 100644 --- a/internal/pkg/overlay/funcmap_test.go +++ b/internal/pkg/overlay/funcmap_test.go @@ -5,7 +5,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/warewulf/warewulf/internal/pkg/node" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) func Test_createIgnitionJson(t *testing.T) { @@ -51,7 +50,6 @@ func Test_createIgnitionJson(t *testing.T) { ] } }` - wwlog.SetLogLevel(wwlog.DEBUG) config, parse_error := node.Parse([]byte(node_config)) assert.Empty(t, parse_error) diff --git a/internal/pkg/upgrade/node_test.go b/internal/pkg/upgrade/node_test.go index cb4bd486..f827bb4e 100644 --- a/internal/pkg/upgrade/node_test.go +++ b/internal/pkg/upgrade/node_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/warewulf/warewulf/internal/pkg/testenv" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) var nodesYamlUpgradeTests = []struct { @@ -753,7 +752,6 @@ nodes: } func Test_UpgradeNodesYaml(t *testing.T) { - wwlog.SetLogLevel(wwlog.DEBUG) for _, tt := range nodesYamlUpgradeTests { t.Run(tt.name, func(t *testing.T) { env := testenv.New(t) diff --git a/internal/pkg/warewulfd/provision_test.go b/internal/pkg/warewulfd/provision_test.go index a8867e7b..7265ec4c 100644 --- a/internal/pkg/warewulfd/provision_test.go +++ b/internal/pkg/warewulfd/provision_test.go @@ -12,7 +12,6 @@ import ( warewulfconf "github.com/warewulf/warewulf/internal/pkg/config" "github.com/warewulf/warewulf/internal/pkg/testenv" - "github.com/warewulf/warewulf/internal/pkg/wwlog" ) var provisionSendTests = []struct { @@ -93,7 +92,6 @@ nodes: assert.NoError(t, os.WriteFile(path.Join(conf.Paths.OverlayProvisiondir(), "n1", "__RUNTIME__.img"), []byte("runtime overlay"), 0600)) assert.NoError(t, os.WriteFile(path.Join(conf.Paths.OverlayProvisiondir(), "n1", "o1.img"), []byte("specific overlay"), 0600)) - wwlog.SetLogLevel(wwlog.DEBUG) for _, tt := range provisionSendTests { t.Run(tt.description, func(t *testing.T) { req := httptest.NewRequest(http.MethodGet, tt.url, nil)