diff options
author | Gusted <postmaster@gusted.xyz> | 2024-10-24 15:06:19 +0200 |
---|---|---|
committer | Gusted <postmaster@gusted.xyz> | 2024-10-24 15:06:19 +0200 |
commit | 78d243c3044c4a3b80e779ad54770c20e21ff763 (patch) | |
tree | 2f87e55ca1c7eff675c6fe12a20f09906d03c118 /tests/e2e | |
parent | Merge pull request 'Update dependency eslint-plugin-playwright to v2 (forgejo... (diff) | |
download | forgejo-78d243c3044c4a3b80e779ad54770c20e21ff763.tar.xz forgejo-78d243c3044c4a3b80e779ad54770c20e21ff763.zip |
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.
Diffstat (limited to 'tests/e2e')
-rw-r--r-- | tests/e2e/e2e_test.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 3dc8bfd00c..c870b6d86a 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -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()) }) }) } |