alpinegizmo commented on code in PR #20966:
URL: https://github.com/apache/flink/pull/20966#discussion_r992032463
##########
tools/ci/flink-ci-tools/src/test/java/org/apache/flink/tools/ci/licensecheck/NoticeFileCheckerTest.java:
##########
@@ -107,6 +110,36 @@ void testRunSkipsNonDeployedModules() throws IOException {
.isEqualTo(0);
}
+ @Test
+ void testRunIncludesBundledNonDeployedModules() throws IOException {
+ final Multimap<String, Dependency> bundledDependencies =
ArrayListMultimap.create();
+ final Map<String, Optional<NoticeContents>> notices = new HashMap<>();
+
+ // a module that is not deployed but bundles another dependency with
an empty NOTICE
+ final String nonDeployedModuleName = "nonDeployed";
+ final Dependency nonDeployedDependency = Dependency.create("a",
nonDeployedModuleName, "c");
+ final Dependency bundledDependency = Dependency.create("a", "b", "c");
+ bundledDependencies.put(nonDeployedModuleName, bundledDependency);
+ // this would usually not be a problem, but since the module is not
bundled it's not OK!
+ final Optional<NoticeContents> emptyNotice =
+ Optional.of(new NoticeContents(nonDeployedModuleName,
Collections.emptyList()));
+ notices.put(nonDeployedModuleName, emptyNotice);
+
+ // a module that is deploys and bundles the above
Review Comment:
```suggestion
// a module that is deployed and bundles the above
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]