photoprism/teststatus.md
2025-03-07 20:56:41 +10:00

14 KiB

Synopsis

This branch is to enable PostgreSQL as a database for PhotoPrism.
The SQL for SQLite and MariaDB is not compatible with PostgreSQL (or each other) sometimes.
This leads to failures.
All unit tests are passing.

Testing Status

The following shows the tests that were failing as at 2025-02-26. As they are fixed, the status of the test will be updated.

PASS | AddPhotosToAlbum (0.01s)
PASS |   AddPhotosToAlbum/AddMultiplePhotos (0.00s)
PASS |   AddPhotosToAlbum/AddSinglePhoto (0.00s)
PASS |   AddPhotosToAlbum/AddPhotoFromReview (0.00s)
PASS | RemovePhotosFromAlbum (0.01s)
PASS | BatchPhotosPrivate (0.01s)
PASS |   BatchPhotosPrivate/Success (0.01s)
PASS | BatchPhotosApprove (0.01s)
PASS |   BatchPhotosApprove/Success (0.01s)
PASS | GetFace (0.00s)
PASS |   GetFace/Success (0.00s)
PASS |   GetFace/Lowercase (0.00s)
PASS | UpdateFace (0.00s)
PASS |   UpdateFace/Success (0.00s)
PASS | GetMomentsTime (0.00s)
PASS |   GetMomentsTime/get_moments_time (0.00s)
PASS | PhotoPrimary (0.00s)
PASS |   PhotoPrimary/Success (0.00s)
PASS | Zip (0.00s)
PASS |   Zip/Download (0.00s)
PASS | 	github.com/photoprism/photoprism/internal/api	56.180s
PASS | ClientsListCommand (0.04s)
PASS |   ClientsListCommand/Monitoring (0.01s)
PASS |   ClientsListCommand/CSV (0.01s)
PASS | UsersCommand (11.87s)
PASS |   UsersCommand/AddModifyAndRemoveJohn (11.87s)
PASS | 	github.com/photoprism/photoprism/internal/commands	147.531s
PASS | CreateUserDetails (0.00s)
PASS |   CreateUserDetails/Success (0.00s)
PASS | User_InvalidPassword (0.38s)
PASS |   User_InvalidPassword/no_password_existing (0.00s)
PASS | User_Save (0.00s)
PASS |   User_Save/NewUser (0.00s)
PASS | FindUser (0.00s)
PASS |   FindUser/OIDCUser (0.00s)
PASS | User_Validate (0.02s)
PASS |   User_Validate/EmailNotUnique (0.00s)
PASS | User_RedeemToken (0.00s)
PASS |   User_RedeemToken/Alice (0.00s)
PASS | UpdateCounts (0.00s)
PASS | File_ValidFaceCount (0.00s)
PASS |   File_ValidFaceCount/FileFixturesExampleBridge (0.00s)
PASS | File_UnsavedMarkers (0.00s)
PASS |   File_UnsavedMarkers/bridge2.jpg (0.00s)
PASS | Photo_EstimateLocation (0.00s)
PASS |   Photo_EstimateLocation/NotRecentlyEstimated (0.00s)
PASS |   Photo_EstimateLocation/ForceEstimate (0.00s)
PASS |   Photo_EstimateLocation/HasPlace (0.00s)
PASS | Photo_QualityScore (0.00s)
PASS |   Photo_QualityScore/digikam_test (0.00s)
PASS | Photo_SetPrimary (0.00s)
PASS |   Photo_SetPrimary/NoChange (0.00s)
PASS |   Photo_SetPrimary/ChangePrimary (0.00s)
PASS | Photo_FaceCount (0.00s)
PASS |   Photo_FaceCount/Photo04 (0.00s)
PASS | Photo_UnscopedSearch (0.01s)
PASS |   Photo_UnscopedSearch/Ok (0.01s)
PASS | Photo_ScopedSearch (0.01s)
PASS |   Photo_ScopedSearch/Ok (0.01s)
PASS | Photos_UnscopedSearch (0.00s)
PASS |   Photos_UnscopedSearch/Ok (0.00s)
PASS | Photos_ScopedSearch (0.00s)
PASS |   Photos_ScopedSearch/Ok (0.00s)
PASS | 	github.com/photoprism/photoprism/internal/entity	234.554s
PASS | User_RedeemToken (0.00s)
PASS |   User_RedeemToken/Alice (0.00s)
PASS | File_RegenerateIndex (0.04s)
PASS |   File_RegenerateIndex/PhotoUID (0.01s)
PASS | 	github.com/photoprism/photoprism/internal/entity	26.554s
PASS | DialectMysql (0.07s)  <-- Start mariadb via docker to fix.
PASS |   DialectMysql/ValidMigration (0.04s)  <-- Start mariadb via docker to fix.
PASS |   DialectMysql/InvalidDataUpgrade (0.03s)  <-- Start mariadb via docker to fix.
PASS | 	github.com/photoprism/photoprism/internal/entity/dbtest	205.053s  <-- Start mariadb via docker to fix.
PASS | DialectMysql (0.05s)  <-- Start mariadb via docker to fix.
PASS | 	github.com/photoprism/photoprism/internal/entity/migrate	0.171s  <-- Start mariadb via docker to fix.
PASS | UpdateAlbumDefaultCovers (0.00s)
PASS | UpdateAlbumFolderCovers (0.00s)
PASS | UpdateAlbumMonthCovers (0.00s)
PASS | UpdateAlbumCovers (0.00s)
PASS | UpdateLabelCovers (0.00s)
PASS | UpdateSubjectCovers (0.00s)
PASS | UpdateCovers (0.00s)
PASS | FileSelection (0.01s)
PASS |   FileSelection/DownloadSelectionRawSidecarPrivate (0.00s)
PASS |   FileSelection/DownloadSelectionRawOriginals (0.00s)
PASS |   FileSelection/ShareSelectionOriginals (0.00s)
PASS |   FileSelection/ShareSelectionPrimary (0.00s)
PASS |   FileSelection/ShareAlbums (0.00s)
PASS |   FileSelection/ShareMonths (0.00s)
PASS |   FileSelection/ShareFoldersOriginals (0.00s)
PASS |   FileSelection/ShareFolders (0.00s)
PASS |   FileSelection/ShareStatesOriginals (0.00s)
PASS |   FileSelection/ShareStates (0.00s)
PASS | SetDownloadFileID (0.00s)
PASS |   SetDownloadFileID/Success (0.00s)
PASS | FilesByUID (0.00s)
PASS |   FilesByUID/Negative_limit_with_offset (0.00s)
PASS | SetPhotoPrimary (0.00s)
PASS |   SetPhotoPrimary/Success (0.00s)
PASS |   SetPhotoPrimary/no_file_uid (0.00s)
PASS | AlbumFolders (0.00s)
PASS |   AlbumFolders/root (0.00s)
PASS | MomentsTime (0.00s)
PASS |   MomentsTime/PublicOnly (0.00s)
PASS |   MomentsTime/IncludePrivate (0.00s)
PASS | MomentsCountries (0.00s)
PASS |   MomentsCountries/PublicOnly (0.00s)
PASS |   MomentsCountries/IncludePrivate (0.00s)
PASS | MomentsStates (0.00s)
PASS |   MomentsStates/PublicOnly (0.00s)
PASS |   MomentsStates/IncludePrivate (0.00s)
PASS | MomentsCategories (0.00s)
PASS |   MomentsCategories/PublicOnly (0.00s)
PASS |   MomentsCategories/IncludePrivate (0.00s)
PASS | PhotoSelection (0.00s)
PASS |   PhotoSelection/photos_selected (0.00s)
PASS |   PhotoSelection/FindAlbums (0.00s)
PASS |   PhotoSelection/FindMonths (0.00s)
PASS |   PhotoSelection/FindFolders (0.00s)
PASS |   PhotoSelection/FindStates (0.00s)
PASS | FixPrimaries (0.00s)
PASS |   FixPrimaries/Success (0.00s)
PASS | 	github.com/photoprism/photoprism/internal/entity/query	100.671s
PASS | Albums (0.02s)
PASS |   Albums/search_with_string (0.00s)  <-- case insensitivity issue 
PASS |   Albums/Blue (0.00s)  <-- case insensitivity issue 
PASS | Faces (0.00s)
PASS |   Faces/Unknown (0.00s)
PASS |   Faces/Search_with_limit (0.00s)
PASS |   Faces/Find_specific_id (0.00s)
PASS |   Faces/Exclude_Unknown_&_Hidden (0.00s)
PASS | PhotosFilterAlbums (0.10s) <-- case insensitivity issue <-- Fixed using lower
PASS |   PhotosFilterAlbums/Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet* (0.00s)
PASS |   PhotosFilterAlbums/Pet*_pipe_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_whitespace_pipe_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_or_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_OR_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_Ampersand_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_whitespace_Ampersand_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_and_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/Pet*_AND_Berlin_2019 (0.00s)
PASS |   PhotosFilterAlbums/EndsWithAmpersand (0.00s)
PASS |   PhotosFilterAlbums/CenterSingleQuote (0.00s)
PASS |   PhotosFilterAlbums/EndsWithSingleQuote (0.00s)
PASS |   PhotosFilterAlbums/CenterAsterisk (0.00s)
PASS |   PhotosFilterAlbums/EndsWithAsterisk (0.00s)
PASS |   PhotosFilterAlbums/CenterPipe (0.00s)
PASS |   PhotosFilterAlbums/EndsWithPipe (0.00s)
PASS |   PhotosFilterAlbums/CenterNumber (0.00s)
PASS |   PhotosFilterAlbums/EndsWithNumber (0.00s)
PASS |   PhotosFilterAlbums/AndSearch (0.00s)
PASS |   PhotosFilterAlbums/OrSearch (0.00s)
PASS |   PhotosFilterAlbums/AndSearch2 (0.00s)
PASS |   PhotosFilterAlbums/OrSearch2 (0.00s)
PASS |   PhotosFilterAlbums/AndSearch3 (0.00s)
PASS |   PhotosFilterAlbums/OrSearch3 (0.00s)
PASS | PhotosQueryAlbums (0.08s) <-- case insensitivity issue 
PASS |   PhotosQueryAlbums/Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet* (0.00s)
PASS |   PhotosQueryAlbums/Pet*_pipe_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_whitespace_pipe_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_or_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_OR_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_Ampersand_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_whitespace_Ampersand_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_and_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/Pet*_AND_Berlin_2019 (0.00s)
PASS |   PhotosQueryAlbums/EndsWithAmpersand (0.00s)
PASS |   PhotosQueryAlbums/CenterSingleQuote (0.00s)
PASS |   PhotosQueryAlbums/EndsWithSingleQuote (0.00s)
PASS |   PhotosQueryAlbums/CenterAsterisk (0.00s)
PASS |   PhotosQueryAlbums/EndsWithAsterisk (0.00s)
PASS |   PhotosQueryAlbums/CenterPipe (0.00s)
PASS |   PhotosQueryAlbums/EndsWithPipe (0.00s)
PASS |   PhotosQueryAlbums/CenterNumber (0.00s)
PASS |   PhotosQueryAlbums/EndsWithNumber (0.00s)
PASS |   PhotosQueryAlbums/AndSearch (0.00s)
PASS |   PhotosQueryAlbums/OrSearch (0.00s)
PASS |   PhotosQueryAlbums/AndSearch2 (0.00s)
PASS |   PhotosQueryAlbums/OrSearch2 (0.00s)
PASS |   PhotosQueryAlbums/AndSearch3 (0.00s)
PASS |   PhotosQueryAlbums/OrSearch3 (0.00s)
PASS | PhotosFilterLabel (0.02s)
PASS |   PhotosFilterLabel/flower (0.00s)
PASS |   PhotosFilterLabel/cake (0.00s)
PASS |   PhotosFilterLabel/cake_pipe_flower (0.00s)
PASS |   PhotosFilterLabel/cake_whitespace_pipe_whitespace_flower (0.00s)
PASS |   PhotosFilterLabel/StartsWithNumber (0.00s)
PASS |   PhotosFilterLabel/CenterNumber (0.00s)
PASS |   PhotosFilterLabel/EndsWithNumber (0.00s)
PASS |   PhotosFilterLabel/OrSearch (0.00s)
PASS | PhotosQueryLabel (0.05s)
PASS |   PhotosQueryLabel/flower (0.00s)
PASS |   PhotosQueryLabel/cake (0.00s)
PASS |   PhotosQueryLabel/cake_pipe_flower (0.00s)
PASS |   PhotosQueryLabel/cake_whitespace_pipe_whitespace_flower (0.00s)
PASS |   PhotosQueryLabel/StartsWithNumber (0.00s)
PASS |   PhotosQueryLabel/CenterNumber (0.00s)
PASS |   PhotosQueryLabel/EndsWithNumber (0.00s)
PASS |   PhotosQueryLabel/OrSearch (0.00s)
PASS | PhotosGeoFilterAlbums (0.15s) <-- case insensitivity issue 
PASS |   PhotosGeoFilterAlbums/Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet* (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_pipe_Berlin_2019 (0.01s)
PASS |   PhotosGeoFilterAlbums/Pet*_whitespace_pipe_whitespace_Berlin_2019 (0.01s)
PASS |   PhotosGeoFilterAlbums/Pet*_or_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_OR_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_Ampersand_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_whitespace_Ampersand_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_and_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/Pet*_AND_Berlin_2019 (0.00s)
PASS |   PhotosGeoFilterAlbums/EndsWithAmpersand (0.00s)
PASS |   PhotosGeoFilterAlbums/CenterSingleQuote (0.00s)
PASS |   PhotosGeoFilterAlbums/EndsWithSingleQuote (0.00s)
PASS |   PhotosGeoFilterAlbums/CenterAsterisk (0.00s)
PASS |   PhotosGeoFilterAlbums/EndsWithAsterisk (0.00s)
PASS |   PhotosGeoFilterAlbums/CenterPipe (0.00s)
PASS |   PhotosGeoFilterAlbums/EndsWithPipe (0.00s)
PASS |   PhotosGeoFilterAlbums/CenterNumber (0.00s)
PASS |   PhotosGeoFilterAlbums/EndsWithNumber (0.00s)
PASS |   PhotosGeoFilterAlbums/AndSearch (0.01s)
PASS |   PhotosGeoFilterAlbums/OrSearch (0.00s)
PASS |   PhotosGeoFilterAlbums/AndSearch2 (0.00s)
PASS |   PhotosGeoFilterAlbums/OrSearch2 (0.00s)
PASS |   PhotosGeoFilterAlbums/AndSearch3 (0.00s)
PASS |   PhotosGeoFilterAlbums/OrSearch3 (0.00s)
PASS | PhotosGeoQueryAlbums (0.11s) <-- case insensitivity issue 
PASS |   PhotosGeoQueryAlbums/Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet* (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_pipe_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_whitespace_pipe_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_or_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_OR_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_Ampersand_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_whitespace_Ampersand_whitespace_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_and_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/Pet*_AND_Berlin_2019 (0.00s)
PASS |   PhotosGeoQueryAlbums/EndsWithAmpersand (0.00s)
PASS |   PhotosGeoQueryAlbums/CenterSingleQuote (0.00s)
PASS |   PhotosGeoQueryAlbums/EndsWithSingleQuote (0.00s)
PASS |   PhotosGeoQueryAlbums/CenterAsterisk (0.00s)
PASS |   PhotosGeoQueryAlbums/EndsWithAsterisk (0.00s)
PASS |   PhotosGeoQueryAlbums/CenterPipe (0.00s)
PASS |   PhotosGeoQueryAlbums/EndsWithPipe (0.00s)
PASS |   PhotosGeoQueryAlbums/CenterNumber (0.00s)
PASS |   PhotosGeoQueryAlbums/EndsWithNumber (0.00s)
PASS |   PhotosGeoQueryAlbums/AndSearch (0.00s)
PASS |   PhotosGeoQueryAlbums/OrSearch (0.00s)
PASS |   PhotosGeoQueryAlbums/AndSearch2 (0.00s)
PASS |   PhotosGeoQueryAlbums/OrSearch2 (0.00s)
PASS |   PhotosGeoQueryAlbums/AndSearch3 (0.00s)
PASS |   PhotosGeoQueryAlbums/OrSearch3 (0.00s)
PASS | Geo (0.07s) <-- case insensitivity issue 
PASS |   Geo/Albums (0.00s)
PASS |   Geo/albums_and_and_or_search (0.00s)
PASS |   Geo/subjects_and_and_or_search (0.00s)
PASS |   Geo/people_=_subjects_&_person_=_subject (0.01s)
PASS | Photos (0.26s) <-- case insensitivity issue 
PASS |   Photos/label_query_landscape (0.00s)
PASS |   Photos/search_for_lens_name (0.00s)
PASS |   Photos/albums (0.00s)
PASS |   Photos/search_for_labels (0.00s)
PASS |   Photos/AlbumsOrSearch (0.00s)
PASS |   Photos/AlbumsAndSearch (0.00s)
PASS |   Photos/Search_in_Title (0.00s)
PASS |   Photos/form.title (0.00s)
PASS | Subjects (0.00s)  <-- case insensitivity issue 
PASS |   Subjects/search_for_alias (0.00s)
PASS | 	github.com/photoprism/photoprism/internal/entity/search	14.435s
PASS | Database (0.00s)
PASS |   Database/Success (0.00s)
PASS | 	github.com/photoprism/photoprism/internal/photoprism/backup	8.539s

the following are the tests that are failing after all the above were addressed, as at 2025-03-02.

PASS | IndexCommand (19.10s)  
PASS | 	github.com/photoprism/photoprism/internal/commands	401.908s  

Inconsistencies Discovered.

  • UpdateSubjectCovers updates 6 x 2 for SQLite and PostgreSQL. But 6 and 0 for MariaDB. Executing the captured SQL against MariaDB results in 6 and 6. Unsure if this is a defect in Gorm not reporting the number of records affected correctly, or something else. This branch has not changed the MariaDB query. Gorm bug https://github.com/go-gorm/gorm/issues/7384

  • github.com/photoprism/photoprism/internal/workers should have failed as there were DB errors thrown that did not cause the test to fail. Tests that the async process can be started, so test is valid. Errors detected have been fixed in gorm2 branch and merged in.

  • time="2025-03-02T12:33:11Z" level=info msg="/go/src/github.com/photoprism/photoprism/internal/entity/file.go:629 ERROR: column files.uuid does not exist (SQLSTATE 42703)\n[0.778ms] [rows:0] SELECT "files"."id","files"."uuid","files"."taken_at" SNIP FROM "files"" is generated from a file trying to return a photo. Check if this error is just internal gorm stuff. Errors detected have been fixed in gorm2 branch and merged in.