You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by jo...@apache.org on 2025/07/23 14:17:38 UTC
(jackrabbit-filevault) 02/02: JCRVLT-810 add integration tests
This is an automated email from the ASF dual-hosted git repository.
joerghoh pushed a commit to branch JCRVLT-810
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
commit 13245e579c242faa211948d57903002061921ab5
Author: Joerg Hoh <jh...@adobe.com>
AuthorDate: Wed Jul 23 16:16:15 2025 +0200
JCRVLT-810 add integration tests
---
.../vault/packaging/integration/ImportIT.java | 27 +++++++++++++++++++++
.../test-packages/tmp-content-outside-filters.zip | Bin 0 -> 5104 bytes
2 files changed, 27 insertions(+)
diff --git a/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java b/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
index 0cfef3f3..9dc139c9 100644
--- a/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
+++ b/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
@@ -445,4 +445,31 @@ public class ImportIT extends IntegrationTestBase {
assertPropertyExists("/testroot/tika/config.xml/jcr:content/jcr:data");
assertProperty("/testroot/tika/config.xml/jcr:content/jcr:mimeType", "text/xml");
}
+
+ @Test
+ public void testSkipFilterChecksOnImport_disabled() throws Exception {
+ ImportOptions opts = getDefaultOptions();
+ Importer importer = new Importer(opts);
+ try (Archive archive = getFileArchive("/test-packages/tmp-content-outside-filters.zip")) {
+ archive.open(true);
+ importer.run(archive, admin.getRootNode());
+ admin.save();
+ }
+ assertNodeExists("/tmp/foo");
+ assertPropertyMissing("/tmp/foo/bar/tobi/excludeddProp");
+ }
+
+ @Test
+ public void testSkipFilterChecksOnImport_enabled() throws Exception {
+ ImportOptions opts = getDefaultOptions();
+ opts.setSkipFilterChecksOnImport(true);
+ Importer importer = new Importer(opts);
+ try (Archive archive = getFileArchive("/test-packages/tmp-content-outside-filters.zip")) {
+ archive.open(true);
+ importer.run(archive, admin.getRootNode());
+ admin.save();
+ }
+ assertNodeExists("/tmp/foo");
+ assertPropertyExists("/tmp/foo/bar/tobi/excludedProp");
+ }
}
\ No newline at end of file
diff --git a/vault-core-it/vault-core-integration-tests/src/main/resources/test-packages/tmp-content-outside-filters.zip b/vault-core-it/vault-core-integration-tests/src/main/resources/test-packages/tmp-content-outside-filters.zip
new file mode 100644
index 00000000..c852c60e
Binary files /dev/null and b/vault-core-it/vault-core-integration-tests/src/main/resources/test-packages/tmp-content-outside-filters.zip differ