Compare commits

..

2 Commits

Author SHA1 Message Date
Oneric 5bc64c5753 changelog: add note about StripMetadata and ReadDescription order
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/build-arm64 unknown status Details
ci/woodpecker/pr/build-amd64 unknown status Details
ci/woodpecker/pr/docs unknown status Details
2024-04-26 18:57:28 +02:00
Oneric 5ee0fb18cb exiftool: make stripped tags configurable 2024-04-26 18:57:24 +02:00
1 changed files with 10 additions and 6 deletions

View File

@ -6,10 +6,12 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripMetadataTest do
use Pleroma.DataCase
alias Pleroma.Upload.Filter
test "exiftool strip metadata strips GPS etc but preserves Orientation and ColorSpace by default" do
@tag :tmp_dir
test "exiftool strip metadata strips GPS etc but preserves Orientation and ColorSpace by default",
%{tmp_dir: tmp_dir} do
assert Pleroma.Utils.command_available?("exiftool")
tmpfile = "test/fixtures/DSCN0010_#{__MODULE__}_01.jpg"
tmpfile = Path.join(tmp_dir, "tmp.jpg")
File.cp!(
"test/fixtures/DSCN0010.jpg",
@ -40,11 +42,12 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripMetadataTest do
end
# this is a nonsensical configuration, but it shouldn't explode
test "exiftool strip metadata is a noop with empty purge list" do
@tag :tmp_dir
test "exiftool strip metadata is a noop with empty purge list", %{tmp_dir: tmp_dir} do
assert Pleroma.Utils.command_available?("exiftool")
clear_config([Pleroma.Upload.Filter.Exiftool.StripMetadata, :purge], [])
tmpfile = "test/fixtures/DSCN0010_#{__MODULE__}_02.jpg"
tmpfile = Path.join(tmp_dir, "tmp.jpg")
File.cp!(
"test/fixtures/DSCN0010.jpg",
@ -66,11 +69,12 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripMetadataTest do
assert exif_original == exif_filtered
end
test "exiftool strip metadata works with empty preserve list" do
@tag :tmp_dir
test "exiftool strip metadata works with empty preserve list", %{tmp_dir: tmp_dir} do
assert Pleroma.Utils.command_available?("exiftool")
clear_config([Pleroma.Upload.Filter.Exiftool.StripMetadata, :preserve], [])
tmpfile = "test/fixtures/DSCN0010_#{__MODULE__}_03.jpg"
tmpfile = Path.join(tmp_dir, "tmp.jpg")
File.cp!(
"test/fixtures/DSCN0010.jpg",