Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #632 from vania-pooh/master
Browse files Browse the repository at this point in the history
Removed ioutil from devtools test (related to #630)
  • Loading branch information
vania-pooh authored Aug 2, 2023
2 parents 71194a5 + 40f81cc commit 2c0aed6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/chrome/devtools/devtools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down

0 comments on commit 2c0aed6

Please sign in to comment.