0038295bbc
- Load IdPs and supported instance-setting groups as runtime overlays from /etc/secrets. - Reject API mutations of deployment-managed resources and serialize authentication safety checks across database drivers. - Preserve upgrade compatibility, demo SSO policy, stable IdP ordering, and driver-specific transaction retries.
17 lines
495 B
Go
17 lines
495 B
Go
package postgres
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/lib/pq"
|
|
"github.com/pkg/errors"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestIsRetryableAuthenticationMutationError(t *testing.T) {
|
|
db := &DB{}
|
|
require.True(t, db.IsRetryableAuthenticationMutationError(errors.Wrap(&pq.Error{Code: "40001"}, "commit failed")))
|
|
require.True(t, db.IsRetryableAuthenticationMutationError(&pq.Error{Code: "40P01"}))
|
|
require.False(t, db.IsRetryableAuthenticationMutationError(&pq.Error{Code: "23505"}))
|
|
}
|