jdaugherty commented on code in PR #15339:
URL: https://github.com/apache/grails-core/pull/15339#discussion_r2725756274


##########
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/TestContainers.java:
##########
@@ -66,23 +66,30 @@ public void apply(GeneratorContext generatorContext) {
             
generatorContext.getFeature(DatabaseDriverConfigurationFeature.class).ifPresent(driverConfiguration
 -> {
                 String driver = 
"org.testcontainers.jdbc.ContainerDatabaseDriver";
                 if (driverFeature instanceof SQLServer) {
-                    generatorContext.addTemplate("sqlserverEula", new 
StringTemplate("src/test/resources/container-license-acceptance.txt", 
"mcr.microsoft.com/mssql/server:2019-CU4-ubuntu-16.04"));
+                    generatorContext.addTemplate("sqlserverEula",

Review Comment:
   Please do not reformat these files unless it's across different commits.



##########
grails-doc/src/en/guide/testing/unitTesting/installation.adoc:
##########
@@ -23,5 +23,6 @@ To install the unit testing support library add the following 
dependency to the
 [source,groovy,subs="attributes"]
 testCompile "org.apache.grails:grails-testing-support-datamapping"
 testCompile "org.apache.grails:grails-testing-support-web"
+testCompile "org.apache.grails:grails-testing-support-mongodb"

Review Comment:
   This should not be a default recommendation.  Not everyone uses mongodb.  I 
also dont' think this is the right scope since the class will be needed at 
runtime of the test as well as compile.



##########
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/database/TestContainers.java:
##########
@@ -66,23 +66,30 @@ public void apply(GeneratorContext generatorContext) {
             
generatorContext.getFeature(DatabaseDriverConfigurationFeature.class).ifPresent(driverConfiguration
 -> {
                 String driver = 
"org.testcontainers.jdbc.ContainerDatabaseDriver";
                 if (driverFeature instanceof SQLServer) {
-                    generatorContext.addTemplate("sqlserverEula", new 
StringTemplate("src/test/resources/container-license-acceptance.txt", 
"mcr.microsoft.com/mssql/server:2019-CU4-ubuntu-16.04"));
+                    generatorContext.addTemplate("sqlserverEula",
+                            new 
StringTemplate("src/test/resources/container-license-acceptance.txt",
+                                    
"mcr.microsoft.com/mssql/server:2019-CU4-ubuntu-16.04"));
                 }
                 urlForDatabaseDriverFeature(driverFeature).ifPresent(url -> {
-                    Configuration testConfig = 
generatorContext.getConfiguration("test", 
ApplicationConfiguration.testConfig());
+                    Configuration testConfig = 
generatorContext.getConfiguration("test",
+                            ApplicationConfiguration.testConfig());
                     testConfig.put(driverConfiguration.getUrlKey(), url);
                     testConfig.put(driverConfiguration.getDriverKey(), driver);
                 });
-                
artifactIdForDriverFeature(driverFeature).ifPresent(dependencyArtifactId ->
-                        
generatorContext.addDependency(testContainerTestDependency(dependencyArtifactId)));
+                
artifactIdForDriverFeature(driverFeature).ifPresent(dependencyArtifactId -> 
generatorContext
+                        
.addDependency(testContainerTestDependency(dependencyArtifactId)));
             });
         });
         
testContainerArtifactIdByTestFramework(generatorContext.getTestFramework()).ifPresent(testArtifactId
 -> {
             
generatorContext.addDependency(testContainerTestDependency(testArtifactId));
         });
 
-        if (generatorContext.isFeaturePresent(MongoFeature.class) || 
generatorContext.isFeaturePresent(MongoGorm.class)) {
-            
generatorContext.addDependency(testContainerTestDependency("mongodb"));
+        if (generatorContext.isFeaturePresent(MongoFeature.class)
+                || generatorContext.isFeaturePresent(MongoGorm.class)) {
+            generatorContext.addDependency(Dependency.builder()
+                    .groupId("org.apache.grails")
+                    .artifactId("grails-testing-support-mongodb")

Review Comment:
   This is the wrong group id



##########
grails-doc/src/en/guide/testing/unitTesting/unitTestingMongodb.adoc:
##########
@@ -0,0 +1,34 @@
+# Unit Testing GORM for MongoDB

Review Comment:
   This library is not just for unit testing. it's for integration testing as 
well.



-- 
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]

Reply via email to