testscripts: Move server tests to own folder

See #14439
This commit is contained in:
Bjørn Erik Pedersen
2026-01-27 16:53:27 +01:00
parent 5f5b2f378f
commit 00c4228f61
15 changed files with 9 additions and 6 deletions
+9 -6
View File
@@ -32,21 +32,24 @@ import (
"github.com/bep/helpers/envhelpers"
"github.com/gohugoio/hugo/commands"
"github.com/gohugoio/hugo/htesting"
"github.com/rogpeppe/go-internal/testscript"
)
func TestCommands(t *testing.T) {
// These are somewhat flakey and takes some time,
// so usefule to have a way to skip them when developing.
const skipEnv = "HUGOTESTING_SKIP_COMMANDS"
if os.Getenv(skipEnv) != "" {
t.Skipf("skip because %s set in env", skipEnv)
}
p := commonTestScriptsParam
p.Dir = "testscripts/commands"
testscript.Run(t, p)
}
func TestServer(t *testing.T) {
// See issue #14439
htesting.SkipSlowTestUnlessCI(t)
p := commonTestScriptsParam
p.Dir = "testscripts/server"
testscript.Run(t, p)
}
// Tests in development can be put in "testscripts/unfinished".
// Also see the watch_testscripts.sh script.
func TestUnfinished(t *testing.T) {