From 162ea2c152a67c1a162df190449e2e605a711e70 Mon Sep 17 00:00:00 2001 From: Pavel Abramov Date: Wed, 6 Nov 2024 11:00:23 +0100 Subject: [PATCH] msrv: remove deprecated ioutil from tests removing deprecated ioutil from tests and adding commit body to pass linter Signed-off-by: Pavel Abramov --- pkg/pillar/cmd/msrv/msrv_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/pillar/cmd/msrv/msrv_test.go b/pkg/pillar/cmd/msrv/msrv_test.go index 11dca1e44a..20a78ec6f8 100644 --- a/pkg/pillar/cmd/msrv/msrv_test.go +++ b/pkg/pillar/cmd/msrv/msrv_test.go @@ -6,7 +6,6 @@ package msrv_test import ( "bytes" "encoding/json" - "io/ioutil" "net" "net/http" "net/http/httptest" @@ -107,7 +106,7 @@ func TestPostKubeconfig(t *testing.T) { Logger: logger, } - dir, err := ioutil.TempDir("/tmp", "msrv_test") + dir, err := os.MkdirTemp("/tmp", "msrv_test") g.Expect(err).ToNot(gomega.HaveOccurred()) defer os.RemoveAll(dir) @@ -217,7 +216,7 @@ func TestRequestPatchEnvelopes(t *testing.T) { Logger: logger, } - dir, err := ioutil.TempDir("/tmp", "msrv_test") + dir, err := os.MkdirTemp("/tmp", "msrv_test") g.Expect(err).ToNot(gomega.HaveOccurred()) defer os.RemoveAll(dir) @@ -371,7 +370,7 @@ func TestHandleAppInstanceDiscovery(t *testing.T) { Logger: logger, } - dir, err := ioutil.TempDir("/tmp", "msrv_test") + dir, err := os.MkdirTemp("/tmp", "msrv_test") g.Expect(err).ToNot(gomega.HaveOccurred()) defer os.RemoveAll(dir)