@@ -503,6 +503,12 @@ def test_scanpipe_pipes_d2d_java_ignore_pattern(self):
503503 make_resource_file (self .project1 , path = "to/META-INF/MANIFEST.MF" )
504504 make_resource_file (self .project1 , path = "to/test.class" )
505505 make_resource_file (self .project1 , path = "to/META-INF/others.txt" )
506+ make_resource_file (
507+ self .project1 , path = "to/META-INF/spring-configuration-metadata.json"
508+ )
509+ make_resource_file (self .project1 , path = "to/OSGI-INF/test.xml" )
510+ make_resource_file (self .project1 , path = "to/OSGI-INF/test.json" )
511+ make_resource_file (self .project1 , path = "to/OSGI-INF/test.class" )
506512 buffer = io .StringIO ()
507513
508514 java_config = d2d_config .get_ecosystem_config (ecosystem = "Java" )
@@ -511,7 +517,7 @@ def test_scanpipe_pipes_d2d_java_ignore_pattern(self):
511517 patterns_to_ignore = java_config .deployed_resource_path_exclusions ,
512518 logger = buffer .write ,
513519 )
514- expected = "Ignoring 3 to/ resources with ecosystem specific configurations."
520+ expected = "Ignoring 6 to/ resources with ecosystem specific configurations."
515521 self .assertIn (expected , buffer .getvalue ())
516522
517523 def test_scanpipe_pipes_d2d_map_jar_to_java_source (self ):
@@ -612,6 +618,21 @@ def test_scanpipe_pipes_d2d_map_jar_to_scala_source(self):
612618 self .assertEqual (from2 , relation .from_resource )
613619 self .assertEqual (to_jar , relation .to_resource )
614620
621+ def test_scanpipe_pipes_d2d_scala_ignore_pattern (self ):
622+ make_resource_file (self .project1 , path = "to/META-INF/MANIFEST.MF" )
623+ make_resource_file (self .project1 , path = "to/test.class" )
624+ make_resource_file (self .project1 , path = "to/META-INF/others.txt" )
625+ buffer = io .StringIO ()
626+
627+ scala_config = d2d_config .get_ecosystem_config (ecosystem = "Scala" )
628+ d2d .ignore_unmapped_resources_from_config (
629+ project = self .project1 ,
630+ patterns_to_ignore = scala_config .deployed_resource_path_exclusions ,
631+ logger = buffer .write ,
632+ )
633+ expected = "Ignoring 2 to/ resources with ecosystem specific configurations."
634+ self .assertIn (expected , buffer .getvalue ())
635+
615636 def test_scanpipe_pipes_d2d_map_jar_to_kotlin_source (self ):
616637 from1 = make_resource_file (
617638 self .project1 ,
@@ -661,6 +682,23 @@ def test_scanpipe_pipes_d2d_map_jar_to_kotlin_source(self):
661682 self .assertEqual (from2 , relation .from_resource )
662683 self .assertEqual (to_jar , relation .to_resource )
663684
685+ def test_scanpipe_pipes_d2d_kotlin_ignore_pattern (self ):
686+ make_resource_file (self .project1 , path = "to/META-INF/test.knm" )
687+ make_resource_file (self .project1 , path = "to/test.class" )
688+ make_resource_file (
689+ self .project1 , path = "to/META-INF/kotlin-project-structure-metadata.json"
690+ )
691+ buffer = io .StringIO ()
692+
693+ kotlin_config = d2d_config .get_ecosystem_config (ecosystem = "Kotlin" )
694+ d2d .ignore_unmapped_resources_from_config (
695+ project = self .project1 ,
696+ patterns_to_ignore = kotlin_config .deployed_resource_path_exclusions ,
697+ logger = buffer .write ,
698+ )
699+ expected = "Ignoring 2 to/ resources with ecosystem specific configurations."
700+ self .assertIn (expected , buffer .getvalue ())
701+
664702 def test_scanpipe_pipes_d2d_map_jar_to_source_works_for_jar (self ):
665703 from1 = make_resource_file (
666704 self .project1 ,
0 commit comments