mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05:00
chore: output playwright directly to std{out,err}
Instead of letting playwright do the full test suite and then print the output and error, direct the output to std{our,err} for a faster developing loop. This also makes the output colored.
This commit is contained in:
parent
0f99a0e3c0
commit
78d243c304
1 changed files with 2 additions and 9 deletions
|
@ -8,7 +8,6 @@
|
|||
package e2e
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
@ -116,19 +115,13 @@ func TestE2e(t *testing.T) {
|
|||
cmd.Env = os.Environ()
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("GITEA_URL=%s", setting.AppURL))
|
||||
|
||||
var stdout, stderr bytes.Buffer
|
||||
cmd.Stdout = &stdout
|
||||
cmd.Stderr = &stderr
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
err := cmd.Run()
|
||||
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)
|
||||
}
|
||||
|
||||
fmt.Printf("%v", stdout.String())
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue