1// Copyright 2024 The Gitea Authors. All rights reserved.
2// SPDX-License-Identifier: MIT
3
4// This "test" is meant to be run with `make test-e2e-debugserver` and will just
5// keep open a gitea instance in a test environment (with the data from
6// `models/fixtures`) on port 3000. This is useful for debugging e2e tests, for
7// example with the playwright vscode extension.
8
9//nolint:forbidigo
10package e2e
11
12import (
13 "fmt"
14 "net/url"
15 "os"
16 "os/signal"
17 "syscall"
18 "testing"
19
20 "forgejo.org/modules/setting"
21)
22
23func TestDebugserver(t *testing.T) {
24 done := make(chan os.Signal, 1)
25 signal.Notify(done, syscall.SIGINT, syscall.SIGTERM)
26
27 onForgejoRun(t, func(*testing.T, *url.URL) {
28 defer DeclareGitRepos(t)()
29 fmt.Println(setting.AppURL)
30 <-done
31 })
32}