mirror of
https://github.com/photoprism/photoprism.git
synced 2025-09-26 21:01:58 +08:00
Fixed filenames in tests to make them pass on case-sensitive filesystems
This commit is contained in:
@@ -21,14 +21,20 @@ func TestConverter_ConvertToJpeg(t *testing.T) {
|
||||
|
||||
converter := NewConverter(conf.DarktableCli)
|
||||
|
||||
jpegFilename := conf.ImportPath + "/iphone/IMG_6788.jpg"
|
||||
jpegFilename := conf.ImportPath + "/iphone/IMG_6788.JPG"
|
||||
|
||||
assert.Truef(t, fileExists(jpegFilename), "file does not exist: %s", jpegFilename)
|
||||
|
||||
t.Logf("Testing RAW to JPEG converter with %s", jpegFilename)
|
||||
|
||||
imageJpeg, _ := converter.ConvertToJpeg(NewMediaFile(jpegFilename))
|
||||
imageJpeg, err := converter.ConvertToJpeg(NewMediaFile(jpegFilename))
|
||||
|
||||
assert.Empty(t, err, "ConvertToJpeg() failed")
|
||||
|
||||
infoJpeg, err := imageJpeg.GetExifData()
|
||||
|
||||
assert.Emptyf(t, err, "GetExifData() failed")
|
||||
|
||||
assert.Equal(t, jpegFilename, imageJpeg.filename)
|
||||
|
||||
assert.False(t, infoJpeg == nil || err != nil, "Could not read EXIF data of JPEG image")
|
||||
|
@@ -11,8 +11,8 @@ services:
|
||||
database:
|
||||
image: mysql:latest
|
||||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
- database-data:/var/lib/mysql
|
||||
environment:
|
||||
|
@@ -28,7 +28,7 @@ func TestImporter_GetDestinationFilename(t *testing.T) {
|
||||
conf.InitializeTestData(t)
|
||||
importer := NewImporter(conf.OriginalsPath)
|
||||
|
||||
rawFile := NewMediaFile(conf.ImportPath + "/raw/IMG_1435.cr2")
|
||||
rawFile := NewMediaFile(conf.ImportPath + "/raw/IMG_1435.CR2")
|
||||
|
||||
filename, err := importer.GetDestinationFilename(rawFile, rawFile)
|
||||
|
||||
|
@@ -20,7 +20,7 @@ func TestMediaFile_GetExifData(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "iPhone SE", info.CameraModel)
|
||||
|
||||
image2 := NewMediaFile(conf.ImportPath + "/raw/IMG_1435.cr2")
|
||||
image2 := NewMediaFile(conf.ImportPath + "/raw/IMG_1435.CR2")
|
||||
|
||||
info, err = image2.GetExifData()
|
||||
|
||||
|
Reference in New Issue
Block a user