mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-14 03:12:14 +01:00
fix: LibreOffice newer versions stability (#697)
This commit is contained in:
@@ -3,7 +3,6 @@ package webhook
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gotenberg/gotenberg/v7/pkg/gotenberg"
|
||||
)
|
||||
@@ -59,31 +58,3 @@ func TestWebhook_Middlewares(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestWebhook_AddGraceDuration(t *testing.T) {
|
||||
for i, tc := range []struct {
|
||||
maxRetry int
|
||||
retryMaxWait time.Duration
|
||||
expectDuration time.Duration
|
||||
disable bool
|
||||
}{
|
||||
{
|
||||
maxRetry: 3,
|
||||
retryMaxWait: time.Duration(1) * time.Second,
|
||||
expectDuration: time.Duration(3) * time.Second,
|
||||
},
|
||||
{
|
||||
disable: true,
|
||||
},
|
||||
} {
|
||||
mod := new(Webhook)
|
||||
mod.maxRetry = tc.maxRetry
|
||||
mod.retryMaxWait = tc.retryMaxWait
|
||||
mod.disable = tc.disable
|
||||
|
||||
actual := mod.AddGraceDuration()
|
||||
if actual != tc.expectDuration {
|
||||
t.Errorf("test %d: expected '%s' but got '%s'", i, tc.expectDuration, actual)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user