From 40f81cc172c936529a905ff6ae1dc787b4760a73 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Wed, 2 Aug 2023 13:13:46 +0300 Subject: [PATCH] Removed ioutil from devtools test (related to #630) --- static/chrome/devtools/devtools_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/chrome/devtools/devtools_test.go b/static/chrome/devtools/devtools_test.go index 737c469c7..46c9f77c8 100644 --- a/static/chrome/devtools/devtools_test.go +++ b/static/chrome/devtools/devtools_test.go @@ -175,12 +175,12 @@ func TestDetectDevtoolsHost(t *testing.T) { } func TestDetectDevtoolsHostProfileDir(t *testing.T) { - name, _ := ioutil.TempDir("", "devtools") + name, _ := os.MkdirTemp("", "devtools") defer os.RemoveAll(name) profilePath := filepath.Join(name, "can_be_anything") - os.MkdirAll(profilePath, os.ModePerm) + _ = os.MkdirAll(profilePath, os.ModePerm) portFile := filepath.Join(profilePath, "DevToolsActivePort") - ioutil.WriteFile(portFile, []byte("12345\n/devtools/browser/6f37c7fe-a0a6-4346-a6e2-80c5da0687f0"), 0644) + _ = os.WriteFile(portFile, []byte("12345\n/devtools/browser/6f37c7fe-a0a6-4346-a6e2-80c5da0687f0"), 0644) t.Setenv("BROWSER_PROFILE_DIR", profilePath) AssertThat(t, detectDevtoolsHost(name), EqualTo{"127.0.0.1:12345"})