Commit 258949b
committed
Test refactor, refine errors, remove VSCode fix
This commit is focused on PR feedback:
1. Undoing the fix for running package tests within VSCode
The "Run package tests" action within VSCode uses `-coverprofile` flag when
invoking `go test`, which causes `TestBrowse` to error due to missing
`GOCOVERDIR` env var.
As this was called out as a problem in multiple tests, it felt like a larger
problem to tackle outside of these changes.
2. Ensure browser test runs for Linux/Unix separately from Mac OS
@babakks called out how the previous version of tests would fail on Linux
when testing against Mac OS calculate app.
This test has been reworked to separate Mac OS from Unix/Linux tests as
well as consolidate the separate build specific test files back into a
single file.
3. Improved `error` messages
Rather than having a single, uniform error message from the various scenarios,
this commit more nuanced error messages based on the different scenarios that
are user-friendly.
4. Erring if URL is an executable on the path
This is an additional defense in depth effort to guard against URLs that
match executables found within the user's path. This leverages similar logic
used elsewhere within `gh` for safely finding and executing commands.1 parent 0f8a22f commit 258949b
4 files changed
Lines changed: 204 additions & 195 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 88 | | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | | - | |
| 95 | + | |
100 | 96 | | |
101 | | - | |
| 97 | + | |
102 | 98 | | |
103 | 99 | | |
104 | | - | |
| 100 | + | |
105 | 101 | | |
106 | | - | |
| 102 | + | |
107 | 103 | | |
108 | 104 | | |
109 | 105 | | |
| 106 | + | |
| 107 | + | |
110 | 108 | | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | | - | |
| 118 | + | |
115 | 119 | | |
This file was deleted.
0 commit comments