2024-02-21 17:10:21 +00:00
|
|
|
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
// This "test" is meant to be run with `make test-e2e-debugserver` and will just
|
|
|
|
// keep open a gitea instance in a test environment (with the data from
|
|
|
|
// `models/fixtures`) on port 3000. This is useful for debugging e2e tests, for
|
|
|
|
// example with the playwright vscode extension.
|
|
|
|
|
|
|
|
//nolint:forbidigo
|
|
|
|
package e2e
|
|
|
|
|
|
|
|
import (
|
2024-04-12 11:36:31 +00:00
|
|
|
"fmt"
|
2024-02-21 17:10:21 +00:00
|
|
|
"net/url"
|
|
|
|
"os"
|
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/setting"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestDebugserver(t *testing.T) {
|
|
|
|
done := make(chan os.Signal, 1)
|
|
|
|
signal.Notify(done, syscall.SIGINT, syscall.SIGTERM)
|
|
|
|
|
2024-08-25 12:52:21 +00:00
|
|
|
onForgejoRun(t, func(*testing.T, *url.URL) {
|
|
|
|
defer DeclareGitRepos(t)()
|
2024-04-12 11:36:31 +00:00
|
|
|
fmt.Println(setting.AppURL)
|
2024-02-21 17:10:21 +00:00
|
|
|
<-done
|
|
|
|
})
|
|
|
|
}
|