diff --git a/osxphotos/photosdb.py b/osxphotos/photosdb.py index 3e1b99a8..fbd4456f 100644 --- a/osxphotos/photosdb.py +++ b/osxphotos/photosdb.py @@ -25,12 +25,19 @@ from ._constants import ( ) from ._version import __version__ from .photoinfo import PhotoInfo -from .utils import _check_file_exists, _get_os_version, get_last_library_path, _debug +from .utils import ( + _check_file_exists, + _get_os_version, + get_last_library_path, + _debug, + _open_sql_file, + _db_is_locked, +) # TODO: Add test for imageTimeZoneOffsetSeconds = None # TODO: Fix command line so multiple --keyword, etc. are AND (instead of OR as they are in .photos()) # Or fix the help text to match behavior -# TODO: Add test for __str__ and to_json +# TODO: Add test for __str__ # TODO: Add special albums and magic albums @@ -62,7 +69,7 @@ class PhotosDB: # Path to the Photos library database file self._dbfile = None - # the actual file with library data which on Photos 5 is Photos.sqlite instead of photos.db + # the actual file with library data, which on Photos 5 is Photos.sqlite instead of photos.db self._dbfile_actual = None # Dict with information about all photos by uuid self._dbphotos = {} @@ -94,7 +101,8 @@ class PhotosDB: if dbfile: # shouldn't pass via both *args and dbfile= raise TypeError( - f"photos database path must be specified as argument or named parameter dbfile but not both: args: {dbfile_}, dbfile: {dbfile}", + f"photos database path must be specified as argument or " + f"named parameter dbfile but not both: args: {dbfile_}, dbfile: {dbfile}", dbfile_, dbfile, ) @@ -123,22 +131,38 @@ class PhotosDB: if _debug(): logging.debug(f"dbfile = {dbfile}") - self._dbfile = self._dbfile_actual = os.path.abspath(dbfile) + # init database names + # _tmp_db is the file that will processed by _process_database4/5 + # assume _tmp_db will be _dbfile or _dbfile_actual based on Photos version + # unless DB is locked, in which case _tmp_db will point to a temporary copy + # if Photos <=4, _dbfile = _dbfile_actual = photos.db + # if Photos >= 5, _dbfile = photos.db, from which we get DB version but the actual + # photos data is in Photos.sqlite + # In either case, a temporary copy will be made if the DB is locked by Photos + # or photosanalysisd + self._dbfile = self._dbfile_actual = self._tmp_db = os.path.abspath(dbfile) + + # if database is exclusively locked, make a copy of it and use the copy + # Photos maintains an exclusive lock on the database file while Photos is open + # photoanalysisd sometimes maintains this lock even after Photos is closed + # In those cases, make a temp copy of the file for sqlite3 to read + if _db_is_locked(self._dbfile): + self._tmp_db = self._copy_db_file(self._dbfile) - self._tmp_db = self._copy_db_file(self._dbfile) self._db_version = self._get_db_version() # If Photos >= 5, actual data isn't in photos.db but in Photos.sqlite if int(self._db_version) >= int(_PHOTOS_5_VERSION): - if _debug(): - logging.debug(f"version is {self._db_version}") dbpath = pathlib.Path(self._dbfile).parent dbfile = dbpath / "Photos.sqlite" if not _check_file_exists(dbfile): - sys.exit(f"dbfile {dbfile} does not exist") + raise FileNotFoundError(f"dbfile {dbfile} does not exist", dbfile) else: - self._tmp_db = self._copy_db_file(dbfile) - self._dbfile_actual = dbfile + self._dbfile_actual = self._tmp_db = dbfile + # if database is exclusively locked, make a copy of it and use the copy + if _db_is_locked(self._dbfile_actual): + self._tmp_db = self._copy_db_file(self._dbfile_actual) + if _debug(): logging.debug( f"_dbfile = {self._dbfile}, _dbfile_actual = {self._dbfile_actual}" @@ -319,21 +343,24 @@ class PhotosDB: return dest_path - def _open_sql_file(self, fname): - """ opens sqlite file fname and returns connection to the database """ - try: - conn = sqlite3.connect(f"{pathlib.Path(fname).as_uri()}?mode=ro", uri=True) - c = conn.cursor() - except sqlite3.Error as e: - sys.exit(f"An error occurred opening sqlite file: {e.args[0]} {fname}") - return (conn, c) + # def _open_sql_file(self, fname): + # """ opens sqlite file fname in read-only mode + # returns tuple of (connection, cursor) """ + # try: + # conn = sqlite3.connect( + # f"{pathlib.Path(fname).as_uri()}?mode=ro", timeout=1, uri=True + # ) + # c = conn.cursor() + # except sqlite3.Error as e: + # sys.exit(f"An error occurred opening sqlite file: {e.args[0]} {fname}") + # return (conn, c) def _get_db_version(self): """ gets the Photos DB version from LiGlobals table """ """ returns the version as str""" version = None - (conn, c) = self._open_sql_file(self._tmp_db) + (conn, c) = _open_sql_file(self._tmp_db) # get database version c.execute( @@ -358,7 +385,7 @@ class PhotosDB: # Epoch is Jan 1, 2001 td = (datetime(2001, 1, 1, 0, 0) - datetime(1970, 1, 1, 0, 0)).total_seconds() - (conn, c) = self._open_sql_file(self._tmp_db) + (conn, c) = _open_sql_file(self._tmp_db) # Look for all combinations of persons and pictures c.execute( @@ -799,7 +826,7 @@ class PhotosDB: # Epoch is Jan 1, 2001 td = (datetime(2001, 1, 1, 0, 0) - datetime(1970, 1, 1, 0, 0)).total_seconds() - (conn, c) = self._open_sql_file(self._tmp_db) + (conn, c) = _open_sql_file(self._tmp_db) # Look for all combinations of persons and pictures if _debug(): diff --git a/osxphotos/utils.py b/osxphotos/utils.py index e73ac5f6..e63e7825 100644 --- a/osxphotos/utils.py +++ b/osxphotos/utils.py @@ -2,10 +2,11 @@ import glob import logging import os.path import platform +import sqlite3 import subprocess import tempfile import urllib.parse -from pathlib import Path +import pathlib from plistlib import load as plistload import CoreFoundation @@ -177,8 +178,8 @@ def get_system_library_path(): ) return None - plist_file = Path( - str(Path.home()) + plist_file = pathlib.Path( + str(pathlib.Path.home()) + "/Library/Containers/com.apple.photolibraryd/Data/Library/Preferences/com.apple.photolibraryd.plist" ) if plist_file.is_file(): @@ -200,8 +201,8 @@ def get_system_library_path(): def get_last_library_path(): """ returns the path to the last opened Photos library If a library has never been opened, returns None """ - plist_file = Path( - str(Path.home()) + plist_file = pathlib.Path( + str(pathlib.Path.home()) + "/Library/Containers/com.apple.Photos/Data/Library/Preferences/com.apple.Photos.plist" ) if plist_file.is_file(): @@ -376,3 +377,41 @@ def _export_photo_uuid_applescript( return new_path else: return None + + +def _open_sql_file(dbname): + """ opens sqlite file dbname in read-only mode + returns tuple of (connection, cursor) """ + try: + dbpath = pathlib.Path(dbname).resolve() + conn = sqlite3.connect(f"{dbpath.as_uri()}?mode=ro", timeout=1, uri=True) + c = conn.cursor() + except sqlite3.Error as e: + sys.exit(f"An error occurred opening sqlite file: {e.args[0]} {dbname}") + return (conn, c) + + +def _db_is_locked(dbname): + """ check to see if a sqlite3 db is locked + returns True if database is locked, otherwise False + dbname: name of database to test """ + + # first, check to see if lock file exists, if so, assume the file is locked + lock_name = f"{dbname}.lock" + if os.path.exists(lock_name): + logging.debug(f"{dbname} is locked") + return True + + # no lock file so try to read from the database to see if it's locked + locked = None + try: + (conn, c) = _open_sql_file(dbname) + c.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;") + conn.close() + logging.debug(f"{dbname} is not locked") + locked = False + except Exception as e: + logging.debug(f"{dbname} is locked") + locked = True + + return locked diff --git a/tests/Test-Lock-10_12.photoslibrary/Masters/2020/01/30/20200130-002721/wedding.jpg b/tests/Test-Lock-10_12.photoslibrary/Masters/2020/01/30/20200130-002721/wedding.jpg new file mode 100644 index 00000000..5f29bd3f Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/Masters/2020/01/30/20200130-002721/wedding.jpg differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/DataModelVersion.plist b/tests/Test-Lock-10_12.photoslibrary/database/DataModelVersion.plist new file mode 100644 index 00000000..e5f61b59 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/database/DataModelVersion.plist @@ -0,0 +1,18 @@ + + + + + DatabaseMinorVersion + 1 + DatabaseVersion + 112 + LastOpenMode + 2 + LibrarySchemaVersion + 2622 + MetaSchemaVersion + 2 + createDate + 2020-01-30T00:26:31Z + + diff --git a/tests/Test-Lock-10_12.photoslibrary/database/RKAlbum_name.skindex b/tests/Test-Lock-10_12.photoslibrary/database/RKAlbum_name.skindex new file mode 100644 index 00000000..045c13d0 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/RKAlbum_name.skindex differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/RKMemory_title.skindex b/tests/Test-Lock-10_12.photoslibrary/database/RKMemory_title.skindex new file mode 100644 index 00000000..045c13d0 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/RKMemory_title.skindex differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/RKVersion_searchIndexText.skindex b/tests/Test-Lock-10_12.photoslibrary/database/RKVersion_searchIndexText.skindex new file mode 100644 index 00000000..045c13d0 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/RKVersion_searchIndexText.skindex differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/metaSchema.db b/tests/Test-Lock-10_12.photoslibrary/database/metaSchema.db new file mode 100644 index 00000000..a69a92eb Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/metaSchema.db differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/photos.db b/tests/Test-Lock-10_12.photoslibrary/database/photos.db new file mode 100644 index 00000000..8f611078 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/photos.db differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/photos.db-wal b/tests/Test-Lock-10_12.photoslibrary/database/photos.db-wal new file mode 100644 index 00000000..9aa0bff0 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/database/photos.db-wal differ diff --git a/tests/Test-Lock-10_12.photoslibrary/database/photos.db.lock b/tests/Test-Lock-10_12.photoslibrary/database/photos.db.lock new file mode 100644 index 00000000..20327c64 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/database/photos.db.lock @@ -0,0 +1,16 @@ + + + + + hostname + Rhet-and-Sarahs-iMac.local + hostuuid + A91B9F4C-F77A-565D-A8E1-B550C8F012AF + pid + 741 + processname + photolibraryd + uid + 501 + + diff --git a/tests/Test-Lock-10_12.photoslibrary/private/.metadata_never_index b/tests/Test-Lock-10_12.photoslibrary/private/.metadata_never_index new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.Photos/appPrivateData.plist b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.Photos/appPrivateData.plist new file mode 100644 index 00000000..36b5ab18 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.Photos/appPrivateData.plist @@ -0,0 +1,11 @@ + + + + + LithiumMessageTracer + + LastReportedDate + 2020-01-30T00:26:31Z + + + diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotoAnalysisServicePreferences.plist b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotoAnalysisServicePreferences.plist new file mode 100644 index 00000000..fc58af48 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotoAnalysisServicePreferences.plist @@ -0,0 +1,10 @@ + + + + + PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate + 2020-01-30T00:26:32Z + PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate + 2020-01-30T00:26:32Z + + diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb new file mode 100644 index 00000000..52393d2e Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb-shm b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb-shm differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb-wal b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/construction-photosgraph.graphdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb new file mode 100644 index 00000000..52393d2e Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb-shm b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb-shm differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb-wal b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/liveupdate-photosgraph.graphdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb new file mode 100644 index 00000000..52393d2e Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb-shm b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb-shm differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb-wal b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph-tmp.graphdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb new file mode 100644 index 00000000..d3003722 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb-shm b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb-shm differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb-wal b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/GraphService/PhotosGraph/photosgraph.graphdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/56E90E4C-2EE5-4F71-A6AB-E17EEA3A3525.cmap b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/56E90E4C-2EE5-4F71-A6AB-E17EEA3A3525.cmap new file mode 100644 index 00000000..757ebf2f Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/56E90E4C-2EE5-4F71-A6AB-E17EEA3A3525.cmap differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/91873B6A-81ED-4F44-847C-EC0B0FD9D4F2.cmap b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/91873B6A-81ED-4F44-847C-EC0B0FD9D4F2.cmap new file mode 100644 index 00000000..eff9aff6 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/91873B6A-81ED-4F44-847C-EC0B0FD9D4F2.cmap differ diff --git a/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/AlgoFaceClusterCache.data b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/AlgoFaceClusterCache.data new file mode 100644 index 00000000..40caf8b1 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/private/com.apple.photoanalysisd/VisionService/AlgoFaceClusterCache.data differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/.metadata_never_index b/tests/Test-Lock-10_12.photoslibrary/resources/.metadata_never_index new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/media/face/00/00/facetile_1.jpeg b/tests/Test-Lock-10_12.photoslibrary/resources/media/face/00/00/facetile_1.jpeg new file mode 100644 index 00000000..012183b3 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/media/face/00/00/facetile_1.jpeg differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/moments/analysismetadata.plist b/tests/Test-Lock-10_12.photoslibrary/resources/moments/analysismetadata.plist new file mode 100644 index 00000000..5e8577bb --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/resources/moments/analysismetadata.plist @@ -0,0 +1,16 @@ + + + + + PLLanguageAndLocaleKey + en-US:en_US + PLLastGeoProviderIdKey + 7618 + PLLastLocationInfoFormatVer + 12 + PLLastRevGeoForcedProviderOutOfDateCheckVersionKey + 1 + PLLastRevGeoVerFileFetchDateKey + 2020-01-30T00:26:31Z + + diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/moments/historicalmarker.plist b/tests/Test-Lock-10_12.photoslibrary/resources/moments/historicalmarker.plist new file mode 100644 index 00000000..1f18dda4 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/resources/moments/historicalmarker.plist @@ -0,0 +1,12 @@ + + + + + LastHistoryRowId + 83 + LibraryBuildTag + FF4B0E6D-6231-4212-91F6-7397F96959BD + LibrarySchemaVersion + 2622 + + diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/moments/needsanalysis b/tests/Test-Lock-10_12.photoslibrary/resources/moments/needsanalysis new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/moments/serverinfo.plist b/tests/Test-Lock-10_12.photoslibrary/resources/moments/serverinfo.plist new file mode 100644 index 00000000..ce9edee3 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/resources/moments/serverinfo.plist @@ -0,0 +1,47 @@ + + + + + FileVersion + 11 + Source + + 35230 + + CountryMinVersions + + OTHER + 1 + + CurrentVersion + 1 + NoResultErrorIsSuccess + + + 57879 + + CountryMinVersions + + OTHER + 1 + + CurrentVersion + 1 + NoResultErrorIsSuccess + + + 7618 + + AddCountyIfNeeded + + CountryMinVersions + + OTHER + 10 + + CurrentVersion + 10 + + + + diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_mini_1.jpg b/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_mini_1.jpg new file mode 100644 index 00000000..e27196e9 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_mini_1.jpg differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_thumb_1.jpg b/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_thumb_1.jpg new file mode 100644 index 00000000..06af32ee Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/proxies/derivatives/00/00/1/UNADJUSTEDNONRAW_thumb_1.jpg differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/Info.plist b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/Info.plist new file mode 100644 index 00000000..fdd8b6d9 --- /dev/null +++ b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/Info.plist @@ -0,0 +1,20 @@ + + + + + DatabaseMinorVersion + 1 + DatabaseVersion + 112 + LibrarySchemaVersion + 2622 + MetaSchemaVersion + 2 + SnapshotComplete + + SnapshotCompletedDate + 2020-01-30T00:26:31Z + SnapshotTables + + + diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAdminData/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAdminData/0000000000.lij new file mode 100644 index 00000000..faec8178 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAdminData/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbum/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbum/0000000000.lij new file mode 100644 index 00000000..db1935d1 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbum/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbumVersion/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbumVersion/0000000000.lij new file mode 100644 index 00000000..e2bf9b90 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKAlbumVersion/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKCustomSortOrder/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKCustomSortOrder/0000000000.lij new file mode 100644 index 00000000..9f117025 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKCustomSortOrder/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFace/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFace/0000000000.lij new file mode 100644 index 00000000..558cc321 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFace/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFaceGroup/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFaceGroup/0000000000.lij new file mode 100644 index 00000000..d78e8520 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFaceGroup/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFacePrint/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFacePrint/0000000000.lij new file mode 100644 index 00000000..110cef71 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFacePrint/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFolder/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFolder/0000000000.lij new file mode 100644 index 00000000..86cfbf0d Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKFolder/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImageProxyState/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImageProxyState/0000000000.lij new file mode 100644 index 00000000..dc579d54 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImageProxyState/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImportGroup/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImportGroup/0000000000.lij new file mode 100644 index 00000000..18e2bdf4 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKImportGroup/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeyword/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeyword/0000000000.lij new file mode 100644 index 00000000..6883fe85 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeyword/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeywordForVersion/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeywordForVersion/0000000000.lij new file mode 100644 index 00000000..e6119080 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKKeywordForVersion/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKMaster/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKMaster/0000000000.lij new file mode 100644 index 00000000..3f9a8761 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKMaster/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKModelResource/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKModelResource/0000000000.lij new file mode 100644 index 00000000..dd49dbf4 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKModelResource/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKPerson/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKPerson/0000000000.lij new file mode 100644 index 00000000..79cbe22a Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKPerson/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKSceneInVersion/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKSceneInVersion/0000000000.lij new file mode 100644 index 00000000..3de33229 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKSceneInVersion/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersion/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersion/0000000000.lij new file mode 100644 index 00000000..ee9a627f Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersion/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersionAnalysisState/0000000000.lij b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersionAnalysisState/0000000000.lij new file mode 100644 index 00000000..f24d11a1 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/recovery/RKVersionAnalysisState/0000000000.lij differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/segments/Thumb64Segment_0.data b/tests/Test-Lock-10_12.photoslibrary/resources/segments/Thumb64Segment_0.data new file mode 100644 index 00000000..9bb23095 Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/segments/Thumb64Segment_0.data differ diff --git a/tests/Test-Lock-10_12.photoslibrary/resources/segments/ThumbJPGSegment_0.data b/tests/Test-Lock-10_12.photoslibrary/resources/segments/ThumbJPGSegment_0.data new file mode 100644 index 00000000..1edb90ab Binary files /dev/null and b/tests/Test-Lock-10_12.photoslibrary/resources/segments/ThumbJPGSegment_0.data differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/DataModelVersion.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/DataModelVersion.plist new file mode 100644 index 00000000..be9740fe --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/database/DataModelVersion.plist @@ -0,0 +1,10 @@ + + + + + LibrarySchemaVersion + 5001 + MetaSchemaVersion + 3 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite new file mode 100644 index 00000000..50a16f96 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-shm new file mode 100644 index 00000000..1551f66f Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-wal new file mode 100644 index 00000000..27a5ea88 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite.lock b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite.lock new file mode 100644 index 00000000..7210a10a --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite.lock @@ -0,0 +1,16 @@ + + + + + hostname + Rhets-MacBook-Pro.local + hostuuid + 9575E48B-8D5F-5654-ABAC-4431B1167324 + pid + 1309 + processname + photolibraryd + uid + 501 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/metaSchema.db b/tests/Test-Lock-10_15_1.photoslibrary/database/metaSchema.db new file mode 100644 index 00000000..2d75bd40 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/metaSchema.db differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/photos.db b/tests/Test-Lock-10_15_1.photoslibrary/database/photos.db new file mode 100644 index 00000000..2d75bd40 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/photos.db differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/protection b/tests/Test-Lock-10_15_1.photoslibrary/database/protection new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/graphDataProgress.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/search/graphDataProgress.plist new file mode 100644 index 00000000..c4e5e427 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/graphDataProgress.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite new file mode 100644 index 00000000..4ab71e6c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-shm new file mode 100644 index 00000000..d17ee969 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-wal new file mode 100644 index 00000000..104eef49 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/psi.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchMetadata.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchMetadata.plist new file mode 100644 index 00000000..3eec4180 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchMetadata.plist @@ -0,0 +1,188 @@ + + + + + BlacklistedMeaningsByMeaning + + MePersonUUID + 39488755-78C0-40B2-B378-EDA280E1823C + SceneWhitelist + + Graduation + Aquarium + Food + Ice Skating + Mountain + Cliff + Basketball + Tennis + Jewelry + Cheese + Softball + Football + Circus + Jet Ski + Playground + Carousel + Paint Ball + Windsurfing + Sailboat + Sunbathing + Dam + Fireplace + Flower + Scuba + Hiking + Cetacean + Pier + Bowling + Snowboarding + Zoo + Snowmobile + Theater + Boat + Casino + Car + Diving + Cycling + Musical Instrument + Board Game + Castle + Sunset Sunrise + Martial Arts + Motocross + Submarine + Cat + Snow + Kiteboarding + Squash + Geyser + Music + Archery + Desert + Blackjack + Fireworks + Sportscar + Feline + Soccer + Museum + Baby + Fencing + Railroad + Nascar + Sky Surfing + Bird + Games + Baseball + Dressage + Snorkeling + Pyramid + Kite + Rowboat + Golf + Watersports + Lightning + Canyon + Auditorium + Night Sky + Karaoke + Skiing + Parade + Forest + Hot Air Balloon + Dragon Parade + Easter Egg + Monument + Jungle + Thanksgiving + Jockey Horse + Stadium + Airplane + Ballet + Yoga + Coral Reef + Skating + Wrestling + Bicycle + Tattoo + Amusement Park + Canoe + Cheerleading + Ping Pong + Fishing + Magic + Reptile + Winter Sport + Waterfall + Train + Bonsai + Surfing + Dog + Cake + Sledding + Sandcastle + Glacier + Lighthouse + Equestrian + Rafting + Shore + Hockey + Santa Claus + Formula One Car + Sport + Vehicle + Boxing + Rollerskating + Underwater + Orchestra + Carnival + Rocket + Skateboarding + Helicopter + Performance + Oktoberfest + Water Polo + Skate Park + Animal + Nightclub + String Instrument + Dinosaur + Gymnastics + Cricket + Volcano + Lake + Aurora + Dancing + Concert + Rock Climbing + Hang Glider + Rodeo + Fish + Art + Motorcycle + Volleyball + Wake Boarding + Badminton + Motor Sport + Sumo + Parasailing + Skydiving + Kickboxing + Pinata + Foosball + Go Kart + Poker + Kayak + Swimming + Atv + Beach + Dartboard + Athletics + Camping + Tornado + Billiards + Rugby + Airshow + + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchProgress.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchProgress.plist new file mode 100644 index 00000000..ad779080 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchProgress.plist @@ -0,0 +1,26 @@ + + + + + insertAlbum + + insertAsset + + insertHighlight + + insertMemory + + insertMoment + + removeAlbum + + removeAsset + + removeHighlight + + removeMemory + + removeMoment + + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchSystemInfo.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchSystemInfo.plist new file mode 100644 index 00000000..f6d69ef7 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/database/search/searchSystemInfo.plist @@ -0,0 +1,14 @@ + + + + + embeddingVersion + 1 + localeIdentifier + en_US + sceneTaxonomySHA + 87914a047c69fbe8013fad2c70fa70c6c03b08b56190fe4054c880e6b9f57cc3 + searchIndexVersion + 10 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/synonymsProcess.plist b/tests/Test-Lock-10_15_1.photoslibrary/database/search/synonymsProcess.plist new file mode 100644 index 00000000..79cdd085 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/synonymsProcess.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/database/search/zeroKeywords.data b/tests/Test-Lock-10_15_1.photoslibrary/database/search/zeroKeywords.data new file mode 100644 index 00000000..cb4f7e5e Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/database/search/zeroKeywords.data differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/originals/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37.jpeg b/tests/Test-Lock-10_15_1.photoslibrary/originals/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37.jpeg new file mode 100644 index 00000000..5f29bd3f Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/originals/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37.jpeg differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.Photos/appPrivateData.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.Photos/appPrivateData.plist new file mode 100644 index 00000000..08370bf1 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.Photos/appPrivateData.plist @@ -0,0 +1,8 @@ + + + + + CollapsedSidebarSectionIdentifiers + + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite new file mode 100644 index 00000000..132d2332 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm new file mode 100644 index 00000000..66acd0e9 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal new file mode 100644 index 00000000..197ae839 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite new file mode 100644 index 00000000..ca6d10fa Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm new file mode 100644 index 00000000..6b1c919a Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal new file mode 100644 index 00000000..955f8cb8 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite new file mode 100644 index 00000000..0dc59ba4 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite new file mode 100644 index 00000000..488ac8f4 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm new file mode 100644 index 00000000..be4af185 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal new file mode 100644 index 00000000..ed831814 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite new file mode 100644 index 00000000..9e94c59d Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSContactCache.sqlite-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite new file mode 100644 index 00000000..e67c1e99 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm new file mode 100644 index 00000000..1e4b74ae Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal new file mode 100644 index 00000000..367a314a Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite new file mode 100644 index 00000000..ef5da49e Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite new file mode 100644 index 00000000..4ab71e6c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm new file mode 100644 index 00000000..049465de Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal new file mode 100644 index 00000000..2f50ceba Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist new file mode 100644 index 00000000..0ffe7e55 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSharingFeatureExtractorRecords.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSharingFeatureExtractorRecords.plist new file mode 100644 index 00000000..0de953ba Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSharingFeatureExtractorRecords.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist new file mode 100644 index 00000000..26cea644 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist @@ -0,0 +1,26 @@ + + + + + BackgroundHighlightCollection + 2020-01-30T01:43:51Z + BackgroundHighlightEnrichment + 2020-01-30T01:43:51Z + BackgroundJobAssetRevGeocode + 2020-01-30T01:43:51Z + BackgroundJobSearch + 2020-01-30T01:43:51Z + BackgroundPeopleSuggestion + 2020-01-30T01:43:51Z + BackgroundUserBehaviorProcessor + 2020-01-30T01:43:51Z + PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey + 2020-01-30T01:43:50Z + PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate + 2020-01-30T01:43:50Z + PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate + 2020-01-30T01:43:51Z + SiriPortraitDonation + 2020-01-30T01:43:51Z + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb new file mode 100644 index 00000000..4ab71e6c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/construction-photosgraph.kgdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb new file mode 100644 index 00000000..4ab71e6c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/liveupdate-photosgraph.kgdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb new file mode 100644 index 00000000..4ab71e6c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph-tmp.kgdb-wal new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb new file mode 100644 index 00000000..3e557d78 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm new file mode 100644 index 00000000..70f2aeca Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal new file mode 100644 index 00000000..176a7a25 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist new file mode 100644 index 00000000..46107afd Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/revgeoprovider.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/revgeoprovider.plist new file mode 100644 index 00000000..bf8f1e5d --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/revgeoprovider.plist @@ -0,0 +1,8 @@ + + + + + revgeoprovider + 7618 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photolibraryd/appPrivateData.plist b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photolibraryd/appPrivateData.plist new file mode 100644 index 00000000..2120d8ee --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photolibraryd/appPrivateData.plist @@ -0,0 +1,8 @@ + + + + + PLLibraryServicesManager.LocaleIdentifier + en_US + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photolibraryd/caches/CreateDatabase_20200129-174227-08:00 b/tests/Test-Lock-10_15_1.photoslibrary/private/com.apple.photolibraryd/caches/CreateDatabase_20200129-174227-08:00 new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_1_105_c.jpeg b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_1_105_c.jpeg new file mode 100644 index 00000000..baf15d30 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_1_105_c.jpeg differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/masters/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_4_5005_c.jpeg b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/masters/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_4_5005_c.jpeg new file mode 100644 index 00000000..97f42659 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/masters/E/E1E4B1A5-AC21-4CAD-AA64-34BB96CE5B37_4_5005_c.jpeg differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/3305.ithmb b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/3305.ithmb new file mode 100644 index 00000000..8b58581f Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/3305.ithmb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4031.ithmb b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4031.ithmb new file mode 100644 index 00000000..ce4335bc Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4031.ithmb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4132.ithmb b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4132.ithmb new file mode 100644 index 00000000..a3dac83c Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/4132.ithmb differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/thumbnailConfiguration b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/thumbnailConfiguration new file mode 100644 index 00000000..8c122be1 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/derivatives/thumbs/thumbnailConfiguration @@ -0,0 +1,10 @@ + + + + + PLThumbnailManagerThumbnailFormatKey + 5005 + PLThumbnailManagerVersionKey + 28 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Album-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Album-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Album.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Album.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Album.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset-change.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset-change.plj new file mode 100644 index 00000000..f3936853 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset-change.plj differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset.plist new file mode 100644 index 00000000..d924a0bd --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Asset.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 10 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 10 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DeferredRebuildFace-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DeferredRebuildFace-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DeferredRebuildFace.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DeferredRebuildFace.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DeferredRebuildFace.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DetectedFace-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DetectedFace-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DetectedFace.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DetectedFace.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/DetectedFace.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FetchingAlbum-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FetchingAlbum-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FetchingAlbum.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FetchingAlbum.plist new file mode 100644 index 00000000..d950d3b7 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FetchingAlbum.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 2 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 2 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FileSystemVolume-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FileSystemVolume-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FileSystemVolume.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FileSystemVolume.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/FileSystemVolume.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder-snapshot.plj new file mode 100644 index 00000000..49fa6d6f Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder-snapshot.plj differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder.plist new file mode 100644 index 00000000..a33b13c3 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Folder.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:30Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/HistoryToken.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/HistoryToken.plist new file mode 100644 index 00000000..3cb93d75 Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/HistoryToken.plist differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession-change.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession-change.plj new file mode 100644 index 00000000..f38a0bdf Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession-change.plj differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ImportSession.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword-change.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword-change.plj new file mode 100644 index 00000000..45108d8a Binary files /dev/null and b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword-change.plj differ diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword.plist new file mode 100644 index 00000000..cfdb2366 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Keyword.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:28Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Memory-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Memory-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Memory.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Memory.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Memory.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Person-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Person-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Person.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Person.plist new file mode 100644 index 00000000..84584217 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/Person.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:29Z + snapshotPayloadVersion + 1 + + diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ProjectAlbum-snapshot.plj b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ProjectAlbum-snapshot.plj new file mode 100644 index 00000000..e69de29b diff --git a/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ProjectAlbum.plist b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ProjectAlbum.plist new file mode 100644 index 00000000..cfdb2366 --- /dev/null +++ b/tests/Test-Lock-10_15_1.photoslibrary/resources/journals/ProjectAlbum.plist @@ -0,0 +1,12 @@ + + + + + currentPayloadVersion + 1 + snapshotDate + 2020-01-30T01:42:28Z + snapshotPayloadVersion + 1 + + diff --git a/tests/test_utils.py b/tests/test_utils.py index 27ea5b2c..f2c83a6c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,5 +1,9 @@ import pytest +DB_LOCKED_10_12 = "./tests/Test-Lock-10_12.photoslibrary/database/photos.db" +DB_LOCKED_10_15 = "./tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite" +DB_UNLOCKED_10_15 = "./tests/Test-10.15.1.photoslibrary/database/photos.db" + def test_debug_enable(): import osxphotos @@ -35,3 +39,15 @@ def test_get_system_library_path(): else: assert osxphotos.utils.get_system_library_path() is not None + +def test_db_is_locked_locked(): + import osxphotos + + assert osxphotos.utils._db_is_locked(DB_LOCKED_10_12) + assert osxphotos.utils._db_is_locked(DB_LOCKED_10_15) + + +def test_db_is_locked_unlocked(): + import osxphotos + + assert not osxphotos.utils._db_is_locked(DB_UNLOCKED_10_15)