Files
memos/store/db/mysql/auth_config_test.go
T
boojack 0038295bbc feat(config): provision settings from secret files
- 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.
2026-07-13 22:34:24 +08:00

17 lines
556 B
Go

package mysql
import (
"testing"
mysqldriver "github.com/go-sql-driver/mysql"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
)
func TestIsRetryableAuthenticationMutationError(t *testing.T) {
db := &DB{}
require.True(t, db.IsRetryableAuthenticationMutationError(errors.Wrap(&mysqldriver.MySQLError{Number: 1213}, "commit failed")))
require.True(t, db.IsRetryableAuthenticationMutationError(&mysqldriver.MySQLError{Number: 1205}))
require.False(t, db.IsRetryableAuthenticationMutationError(&mysqldriver.MySQLError{Number: 1062}))
}