GetRawSyncXattr retrieves the _sync xattr from the bucket without going through typical CRUD processing.
(t *testing.T, collection base.DataStore, docID string)
| 953 | |
| 954 | // GetRawSyncXattr retrieves the _sync xattr from the bucket without going through typical CRUD processing. |
| 955 | func GetRawSyncXattr(t *testing.T, collection base.DataStore, docID string) SyncData { |
| 956 | xattrs, _, err := collection.GetXattrs(base.TestCtx(t), docID, []string{base.SyncXattrName}) |
| 957 | require.NoError(t, err, "Could not find _sync xattr for %s", docID) |
| 958 | require.Contains(t, xattrs, base.SyncXattrName, "Could not find _sync xattr for %s", docID) |
| 959 | var syncData SyncData |
| 960 | require.NoError(t, base.JSONUnmarshal(xattrs[base.SyncXattrName], &syncData)) |
| 961 | return syncData |
| 962 | } |
| 963 | |
| 964 | // GetRawGlobalSync retrieves the _globalSync xattr. Fails if the xattr is not found. |
| 965 | func GetRawGlobalSync(t *testing.T, collection base.DataStore, docID string) GlobalSyncData { |