Fixed filenames in tests to make them pass on case-sensitive filesystems

This commit is contained in:
Michael Mayer 2018-02-28 11:11:26 +01:00
parent 91eae960c6
commit 1b4b44379e
4 changed files with 12 additions and 6 deletions

View file

@ -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")

View file

@ -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:

View file

@ -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)

View file

@ -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()