feat: persist and transfer script command payloads
This commit is contained in:
@@ -63,6 +63,10 @@ func TestScriptUploadDurableExactReplayAndCommit_HP_SCRIPT_01(t *testing.T) {
|
||||
if err != nil || !duplicate.Duplicate || !duplicate.Committed {
|
||||
t.Fatalf("ScriptCommit replay = %#v, %v", duplicate, err)
|
||||
}
|
||||
duplicate, err = store.AppendScriptChunk(ctx, issue, 0, raw[:len(first)], sha256.Sum256(raw[:len(first)]))
|
||||
if err != nil || !duplicate.Duplicate || !duplicate.Committed || duplicate.ReceivedBytes != uint64(len(raw)) {
|
||||
t.Fatalf("post-commit ScriptChunk replay = %#v, %v", duplicate, err)
|
||||
}
|
||||
if _, err := store.AppendScriptChunk(ctx, issue, uint64(len(raw)), []byte("!"), sha256.Sum256([]byte("!"))); !errors.Is(err, ErrScriptTerminal) {
|
||||
t.Fatalf("post-commit chunk error = %v, want ErrScriptTerminal", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user