Revert "Fix PostProcess regression for hugo server"

This reverts commit 4deb5c6066.
This commit is contained in:
Bjørn Erik Pedersen 2022-04-17 10:35:01 +02:00
parent 363bc907c0
commit 6c35a1a9ea
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
4 changed files with 38 additions and 66 deletions

View file

@ -31,6 +31,16 @@ import (
qt "github.com/frankban/quicktest"
)
func TestServer(t *testing.T) {
c := qt.New(t)
r := runServerTest(c, true, "")
c.Assert(r.err, qt.IsNil)
c.Assert(r.homeContent, qt.Contains, "List: Hugo Commands")
c.Assert(r.homeContent, qt.Contains, "Environment: development")
}
// Issue 9518
func TestServerPanicOnConfigError(t *testing.T) {
c := qt.New(t)
@ -91,42 +101,6 @@ baseURL="https://example.org"
}
func TestServerBugs(t *testing.T) {
c := qt.New(t)
for _, test := range []struct {
name string
flag string
assert func(c *qt.C, r serverTestResult)
}{
// Issue 9788
{"PostProcess, memory", "", func(c *qt.C, r serverTestResult) {
c.Assert(r.err, qt.IsNil)
c.Assert(r.homeContent, qt.Contains, "PostProcess: /foo.min.css")
}},
{"PostProcess, disk", "--renderToDisk", func(c *qt.C, r serverTestResult) {
c.Assert(r.err, qt.IsNil)
c.Assert(r.homeContent, qt.Contains, "PostProcess: /foo.min.css")
}},
} {
c.Run(test.name, func(c *qt.C) {
config := `
baseURL="https://example.org"
`
var args []string
if test.flag != "" {
args = strings.Split(test.flag, "=")
}
r := runServerTest(c, true, config, args...)
test.assert(c, r)
})
}
}
type serverTestResult struct {
err error
homeContent string