(t *testing.T, revTree RevTree, revID string, parentRevID string, isTombstone bool)
| 1071 | } |
| 1072 | |
| 1073 | func addAndGet(t *testing.T, revTree RevTree, revID string, parentRevID string, isTombstone bool) error { |
| 1074 | |
| 1075 | revBody := []byte(`{"foo":"bar"}`) |
| 1076 | err := revTree.addRevision("foobar", RevInfo{ |
| 1077 | ID: revID, |
| 1078 | Parent: parentRevID, |
| 1079 | Body: revBody, |
| 1080 | Deleted: isTombstone, |
| 1081 | }) |
| 1082 | require.NoError(t, err) |
| 1083 | history, err := revTree.getHistory(revID) |
| 1084 | log.Printf("addAndGet. Tree length: %d. History for new rev: %v", len(revTree), history) |
| 1085 | return err |
| 1086 | } |
| 1087 | |
| 1088 | // TestPruneRevisionsWithDisconnectedTombstones ensures that disconnected tombstoned branches are correctly pruned away. Reproduces CBG-1076. |
| 1089 | func TestPruneRevisionsWithDisconnected(t *testing.T) { |
no test coverage detected