Adapt converter test to use files from new smaller testdata
This commit is contained in:
parent
a85805c8e1
commit
3a10911659
1 changed files with 8 additions and 8 deletions
|
@ -28,7 +28,7 @@ func TestConverter_ConvertToJpeg(t *testing.T) {
|
|||
|
||||
converter := NewConverter(conf)
|
||||
|
||||
jpegFilename := conf.ImportPath() + "/iphone/IMG_6788.JPG"
|
||||
jpegFilename := conf.ImportPath() + "/fern_green.jpg"
|
||||
|
||||
assert.Truef(t, util.Exists(jpegFilename), "file does not exist: %s", jpegFilename)
|
||||
|
||||
|
@ -54,9 +54,9 @@ func TestConverter_ConvertToJpeg(t *testing.T) {
|
|||
|
||||
assert.False(t, infoJpeg == nil || err != nil, "Could not read EXIF data of JPEG image")
|
||||
|
||||
assert.Equal(t, "iPhone SE", infoJpeg.CameraModel)
|
||||
assert.Equal(t, "Canon EOS 7D", infoJpeg.CameraModel)
|
||||
|
||||
rawFilename := conf.ImportPath() + "/raw/IMG_1435.CR2"
|
||||
rawFilename := conf.ImportPath() + "/raw/IMG_2567.CR2"
|
||||
|
||||
t.Logf("Testing RAW to JPEG converter with %s", rawFilename)
|
||||
|
||||
|
@ -66,7 +66,7 @@ func TestConverter_ConvertToJpeg(t *testing.T) {
|
|||
|
||||
imageRaw, _ := converter.ConvertToJpeg(rawMediaFile)
|
||||
|
||||
assert.True(t, util.Exists(conf.ImportPath()+"/raw/IMG_1435.jpg"), "Jpeg file was not found - is Darktable installed?")
|
||||
assert.True(t, util.Exists(conf.ImportPath()+"/raw/IMG_2567.jpg"), "Jpeg file was not found - is Darktable installed?")
|
||||
|
||||
assert.NotEqual(t, rawFilename, imageRaw.filename)
|
||||
|
||||
|
@ -74,7 +74,7 @@ func TestConverter_ConvertToJpeg(t *testing.T) {
|
|||
|
||||
assert.False(t, infoRaw == nil || err != nil, "Could not read EXIF data of RAW image")
|
||||
|
||||
assert.Equal(t, "Canon EOS M10", infoRaw.CameraModel)
|
||||
assert.Equal(t, "Canon EOS 6D", infoRaw.CameraModel)
|
||||
}
|
||||
|
||||
func TestConverter_ConvertAll(t *testing.T) {
|
||||
|
@ -90,7 +90,7 @@ func TestConverter_ConvertAll(t *testing.T) {
|
|||
|
||||
converter.ConvertAll(conf.ImportPath())
|
||||
|
||||
jpegFilename := conf.ImportPath() + "/raw/IMG_1435.jpg"
|
||||
jpegFilename := conf.ImportPath() + "/raw/canon_eos_6d.jpg"
|
||||
|
||||
assert.True(t, util.Exists(jpegFilename), "Jpeg file was not found - is Darktable installed?")
|
||||
|
||||
|
@ -104,9 +104,9 @@ func TestConverter_ConvertAll(t *testing.T) {
|
|||
|
||||
assert.False(t, infoRaw == nil || err != nil, "Could not read EXIF data of RAW image")
|
||||
|
||||
assert.Equal(t, "Canon EOS M10", infoRaw.CameraModel, "Camera model should be Canon EOS M10")
|
||||
assert.Equal(t, "Canon EOS 6D", infoRaw.CameraModel, "Camera model should be Canon EOS M10")
|
||||
|
||||
existingJpegFilename := conf.ImportPath() + "/raw/20140717_154212_1EC48F8489.jpg"
|
||||
existingJpegFilename := conf.ImportPath() + "/raw/IMG_2567.jpg"
|
||||
|
||||
oldHash := util.Hash(existingJpegFilename)
|
||||
|
||||
|
|
Loading…
Reference in a new issue