mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 21:27:13 +00:00
Merge pull request 'chore: output playwright directly to std{out,err}' (#5685) from gusted/forgejo-improve-e2e-test into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5685 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
8b7410f35c
|
@ -8,7 +8,6 @@
|
||||||
package e2e
|
package e2e
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
@ -116,19 +115,13 @@ func TestE2e(t *testing.T) {
|
||||||
cmd.Env = os.Environ()
|
cmd.Env = os.Environ()
|
||||||
cmd.Env = append(cmd.Env, fmt.Sprintf("GITEA_URL=%s", setting.AppURL))
|
cmd.Env = append(cmd.Env, fmt.Sprintf("GITEA_URL=%s", setting.AppURL))
|
||||||
|
|
||||||
var stdout, stderr bytes.Buffer
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stdout = &stdout
|
cmd.Stderr = os.Stderr
|
||||||
cmd.Stderr = &stderr
|
|
||||||
|
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Currently colored output is conflicting. Using Printf until that is resolved.
|
|
||||||
fmt.Printf("%v", stdout.String())
|
|
||||||
fmt.Printf("%v", stderr.String())
|
|
||||||
log.Fatal("Playwright Failed: %s", err)
|
log.Fatal("Playwright Failed: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("%v", stdout.String())
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue