This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch test/expand-integration-test-coverage
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to
refs/heads/test/expand-integration-test-coverage by this push:
new 8ded2b4a4d fix(test): Fix CI failures in cache and app1 modules
8ded2b4a4d is described below
commit 8ded2b4a4d6661cb5b4a5643700a8640805ed8a7
Author: James Fredley <[email protected]>
AuthorDate: Fri Jan 30 15:37:55 2026 -0500
fix(test): Fix CI failures in cache and app1 modules
- Add missing micronaut-http-client dependency to cache module for
AdvancedCachingIntegrationSpec
- Fix AdvancedDataBindingController to use bindData() for collection
binding instead of constructor
- Fix undefined contributorsMap variable in bindProjectWithContributors
action
---
.../functionaltests/binding/AdvancedDataBindingController.groovy | 9 +++++++--
grails-test-examples/cache/build.gradle | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git
a/grails-test-examples/app1/grails-app/controllers/functionaltests/binding/AdvancedDataBindingController.groovy
b/grails-test-examples/app1/grails-app/controllers/functionaltests/binding/AdvancedDataBindingController.groovy
index c566a3149c..78ed103c0a 100644
---
a/grails-test-examples/app1/grails-app/controllers/functionaltests/binding/AdvancedDataBindingController.groovy
+++
b/grails-test-examples/app1/grails-app/controllers/functionaltests/binding/AdvancedDataBindingController.groovy
@@ -87,7 +87,8 @@ class AdvancedDataBindingController {
* Test collection binding to List.
*/
def bindTeamWithMembers() {
- def team = new Team(params.subMap(teamBindParams))
+ def team = new Team()
+ bindData(team, params, [include: teamBindParams])
render([
name: team.name,
members: team.members?.findAll { it != null }?.collect { [name:
it.name, role: it.role] } ?: []
@@ -98,7 +99,11 @@ class AdvancedDataBindingController {
* Test Map-based collection binding.
*/
def bindProjectWithContributors() {
- def project = new Project(params.subMap(projectBindParams))
+ def project = new Project()
+ bindData(project, params, [include: projectBindParams])
+ def contributorsMap = project.contributors?.collectEntries { k, v ->
+ [k, [name: v?.name, expertise: v?.expertise]]
+ } ?: [:]
render([
name: project.name,
contributors: contributorsMap
diff --git a/grails-test-examples/cache/build.gradle
b/grails-test-examples/cache/build.gradle
index eded39cad5..a57a3f8d1f 100644
--- a/grails-test-examples/cache/build.gradle
+++ b/grails-test-examples/cache/build.gradle
@@ -64,6 +64,8 @@ dependencies {
runtimeOnly 'org.fusesource.jansi:jansi'
integrationTestImplementation testFixtures('org.apache.grails:grails-geb')
+ integrationTestImplementation
"io.micronaut:micronaut-http-client:$micronautHttpClientVersion"
+ integrationTestImplementation
"io.micronaut.serde:micronaut-serde-jackson:$micronautSerdeJacksonVersion"
testImplementation 'org.apache.grails:grails-testing-support-datamapping'
testImplementation 'org.apache.grails:grails-testing-support-web'