diff --git a/tests/Options/config/app/type.bats b/tests/Options/config/app/type.bats index 57a7dc9b..1056e5d7 100644 --- a/tests/Options/config/app/type.bats +++ b/tests/Options/config/app/type.bats @@ -9,20 +9,27 @@ setup() { docker cp $BATS_TEST_DIRNAME/type/app.xml $DOCKER_CONTAINER:/opt/verapdf-rest/config/app.xml docker cp $BATS_TEST_DIRNAME/type/features.xml $DOCKER_CONTAINER:/opt/verapdf-rest/config/features.xml + docker cp $BATS_TEST_DIRNAME/type/validator.xml $DOCKER_CONTAINER:/opt/verapdf-rest/config/validator.xml } teardown() { docker cp $DOCKER_CONTAINER:/opt/verapdf-rest/config/app.xml $BATS_TEST_TMPDIR - cat $BATS_TEST_TMPDIR/app.xml >&3 + docker cp $DOCKER_CONTAINER:/opt/verapdf-rest/config/validator.xml $BATS_TEST_TMPDIR + docker cp $DOCKER_CONTAINER:/opt/verapdf-rest/config/features.xml $BATS_TEST_TMPDIR + + cat $BATS_TEST_TMPDIR/app.xml >&3 + cat $BATS_TEST_TMPDIR/validator.xml >&3 + cat $BATS_TEST_TMPDIR/features.xml >&3 echo -e "Done ..." >&3 } @test "--type, The default processing model for the GUI, type=VALIDATE_EXTRACT" { - - run curl -F "file=@$PROJECT_ROOT/Resources/Mustang_505.pdf" localhost:8080/api/validate/1b -H "Accept:text/html" - assert_output --partial "ICC profiles" - [ "$status" -eq 0 ] + run curl -F "file=@$PROJECT_ROOT/Resources/5-t02-fail-a.pdf" localhost:8080/api/validate/1b -H "Accept:text/html" + assert_output --partial "Information dictionary" + assert_output --partial "PDF/A-2U validation profile" + + [ "$status" -eq 10 ] } diff --git a/tests/Options/config/app/type/features.xml b/tests/Options/config/app/type/features.xml index 074f4f74..b44fee31 100644 --- a/tests/Options/config/app/type/features.xml +++ b/tests/Options/config/app/type/features.xml @@ -1,27 +1,6 @@ - ACTION - ANNOTATION - COLORSPACE - DOCUMENT_SECURITY - EMBEDDED_FILE - EXT_G_STATE - FONT - FORM_XOBJECT - ICCPROFILE - IMAGE_XOBJECT INFORMATION_DICTIONARY - INTERACTIVE_FORM_FIELDS - LOW_LEVEL_INFO - METADATA - OUTLINES - OUTPUTINTENT - PAGE - PATTERN - POSTSCRIPT_XOBJECT - PROPERTIES - SHADING - SIGNATURE diff --git a/tests/Options/config/app/type/validator.xml b/tests/Options/config/app/type/validator.xml new file mode 100644 index 00000000..956ce054 --- /dev/null +++ b/tests/Options/config/app/type/validator.xml @@ -0,0 +1,2 @@ + + diff --git a/tests/Options/config/features/features/app.xml b/tests/Options/config/features/features/app.xml index f803d19b..b563f1ae 100644 --- a/tests/Options/config/features/features/app.xml +++ b/tests/Options/config/features/features/app.xml @@ -1,5 +1,5 @@ - + https://github.com/veraPDF/veraPDF-validation-profiles/wiki/ diff --git a/tests/Resources/5-t02-fail-a.pdf b/tests/Resources/5-t02-fail-a.pdf new file mode 100644 index 00000000..02faf84f Binary files /dev/null and b/tests/Resources/5-t02-fail-a.pdf differ