re-implement ack behaviour from version 1.0 for compat

This commit is contained in:
2023-02-03 22:51:03 +01:00
parent 01934e29b1
commit 16f6ab4861
16 changed files with 643 additions and 375 deletions

View File

@@ -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)