re-implement ack behaviour from version 1.0 for compat
This commit is contained in:
@@ -27,6 +27,27 @@ func ConvertToCompatID(t *testing.T, ws *logic.Application, newid string) int64
|
||||
return *uidold
|
||||
}
|
||||
|
||||
func ConvertCompatID(t *testing.T, ws *logic.Application, oldid int64, idtype string) string {
|
||||
|
||||
ctx := ws.NewSimpleTransactionContext(5 * time.Second)
|
||||
defer ctx.Cancel()
|
||||
|
||||
idnew, err := ws.Database.Primary.ConvertCompatID(ctx, oldid, idtype)
|
||||
TestFailIfErr(t, err)
|
||||
|
||||
if idnew == nil {
|
||||
TestFail(t, "faile to convert oldid to newid (compat)")
|
||||
}
|
||||
|
||||
err = ctx.CommitTransaction()
|
||||
if err != nil {
|
||||
TestFail(t, "failed to commit")
|
||||
return ""
|
||||
}
|
||||
|
||||
return *idnew
|
||||
}
|
||||
|
||||
func CreateCompatID(t *testing.T, ws *logic.Application, idtype string, newid string) int64 {
|
||||
|
||||
ctx := ws.NewSimpleTransactionContext(5 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user