feat: migrate IM identity and snowflake primary keys
This commit is contained in:
@@ -1236,24 +1236,25 @@ func TestDispatchAccNew(t *testing.T) {
|
||||
|
||||
uid := types.Uid(1)
|
||||
oldSecurity := store.Security
|
||||
oldVerifications := store.Verifications
|
||||
store.Store = ss
|
||||
store.Users = uu
|
||||
store.Security = &testSecurityStore{version: 1}
|
||||
store.Verifications = nil
|
||||
defer func() {
|
||||
store.Store = nil
|
||||
store.Users = nil
|
||||
store.Security = oldSecurity
|
||||
store.Verifications = oldVerifications
|
||||
ctrl.Finish()
|
||||
}()
|
||||
|
||||
remoteAddr := "192.168.0.1"
|
||||
secret := "<==auth-secret==>"
|
||||
tags := []string{"tag1", "tag2"}
|
||||
authRec := &auth.Rec{
|
||||
TenantID: 1,
|
||||
Uid: uid,
|
||||
AuthLevel: auth.LevelAuth,
|
||||
Tags: tags,
|
||||
State: types.StateOK,
|
||||
}
|
||||
ss.EXPECT().GetLogicalAuthHandler("basic").Return(aa)
|
||||
@@ -1271,7 +1272,6 @@ func TestDispatchAccNew(t *testing.T) {
|
||||
ss.EXPECT().GetLogicalAuthHandler("token").Return(aa)
|
||||
token := "<==auth-token==>"
|
||||
aa.EXPECT().GenSecret(gomock.Any()).Return([]byte(token), time.Now(), nil)
|
||||
uu.EXPECT().UpdateTags(types.TenantID(1), uid, tags, nil, nil).Return(tags, nil)
|
||||
|
||||
s := &Session{
|
||||
send: make(chan any, 10),
|
||||
@@ -1293,7 +1293,6 @@ func TestDispatchAccNew(t *testing.T) {
|
||||
User: "newXYZ",
|
||||
Scheme: "basic",
|
||||
Secret: []byte(secret),
|
||||
Tags: []string{"abc", "123"},
|
||||
Desc: &MsgSetDesc{Public: public},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user