fix: LibreOffice newer versions stability (#697)

This commit is contained in:
Julien Neuhart
2023-10-23 17:05:10 +02:00
committed by GitHub
parent 9cc8e16d64
commit 258876d13f
59 changed files with 870 additions and 1383 deletions

View File

@@ -13,6 +13,8 @@ import (
"github.com/labstack/echo/v4"
"go.uber.org/zap"
"github.com/gotenberg/gotenberg/v7/pkg/gotenberg"
)
func TestParseError(t *testing.T) {
@@ -122,7 +124,6 @@ func TestLatencyMiddleware(t *testing.T) {
return nil
},
)(c)
if err != nil {
t.Fatalf("expected no error but got: %v", err)
}
@@ -150,7 +151,6 @@ func TestRootPathMiddleware(t *testing.T) {
return nil
},
)(c)
if err != nil {
t.Fatalf("expected no error but got: %v", err)
}
@@ -191,7 +191,6 @@ func TestTraceMiddleware(t *testing.T) {
return nil
},
)(c)
if err != nil {
t.Fatalf("test %d: expected no error but got: %v", i, err)
}
@@ -271,7 +270,6 @@ func TestLoggerMiddleware(t *testing.T) {
}
err := loggerMiddleware(zap.NewNop(), disableLoggingForPaths)(tc.next)(c)
if err != nil {
t.Errorf("test %d: expected no error but got: %v", i, err)
}
@@ -389,7 +387,7 @@ func TestContextMiddleware(t *testing.T) {
c.Set("trace", "foo")
c.Set("startTime", time.Now())
err := contextMiddleware(time.Duration(10) * time.Second)(tc.next)(c)
err := contextMiddleware(gotenberg.NewFileSystem(), time.Duration(10)*time.Second)(tc.next)(c)
if tc.expectErr && err == nil {
t.Errorf("test %d: expected error but got: %v", i, err)