Fix incorrect CLI exit code and duplicate error message (#26346)
Follow the CLI refactoring, and add tests.
This commit is contained in:
parent
4f513474dc
commit
d92b4cd093
4 changed files with 98 additions and 27 deletions
|
@ -33,3 +33,9 @@ func RedirectURL(resp http.ResponseWriter) string {
|
|||
func IsNormalPageCompleted(s string) bool {
|
||||
return strings.Contains(s, `<footer class="page-footer"`) && strings.Contains(s, `</html>`)
|
||||
}
|
||||
|
||||
func MockVariableValue[T any](p *T, v T) (reset func()) {
|
||||
old := *p
|
||||
*p = v
|
||||
return func() { *p = old }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue