mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-12 18:32:14 +01:00
fixes waitTimeout, waitDelay not working with float
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/standarderror"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
@@ -39,6 +40,15 @@ func AssertConcurrent(t *testing.T, fn func() error, amount int) {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
// RequireStandardError validates that given error
|
||||
// is of an instance of standarderror.Error.
|
||||
// If so, returns the instance of standarderror.Error.
|
||||
func RequireStandardError(t *testing.T, err error) *standarderror.Error {
|
||||
standardized, ok := err.(*standarderror.Error)
|
||||
require.Equal(t, ok, true)
|
||||
return standardized
|
||||
}
|
||||
|
||||
// HTMLTestMultipartForm returns the body
|
||||
// for a multipate/form-data request with all
|
||||
// files under "html" folder.
|
||||
|
||||
Reference in New Issue
Block a user