Skip to content

Commit 162e407

Browse files
committed
Merge branch '7.1.x' into 8.0.x
2 parents d6cac3e + a70bc2d commit 162e407

File tree

57 files changed

+145
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+145
-7
lines changed

.github/workflows/release-notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
workflow_dispatch:
2626
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
2727
concurrency:
28-
group: release-pipeline
28+
group: release-pipeline-71
2929
cancel-in-progress: false
3030
jobs:
3131
update_release_draft:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ env:
3838
TARGET_BRANCH: ${{ github.event.release.target_commitish }}
3939
VERSION: will be computed in each job
4040
concurrency:
41-
group: release-pipeline
41+
group: release-pipeline-71
4242
cancel-in-progress: false
4343
jobs:
4444
publish:

DEVELOPMENT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,27 @@ These can be set on the command line like so:
4444
* `skipMongodbTests` - does not run mongo related tests
4545
* `skipTests` - no tests will run
4646

47+
## Test slicing
48+
49+
Test classes tagged with `@spock.lang.Tag('some-tag')` can be run separately.\
50+
Tags are inherited from superclasses, so a test class is also included if any of its ancestors is tagged.
51+
52+
Example:
53+
54+
```bash
55+
./gradlew iT -PincludeTestTags=geb
56+
```
57+
58+
Available project properties:
59+
60+
* `includeTestTags` - comma-separated list of test tags to include
61+
* `excludeTestTags` - comma-separated list of test tags to exclude
62+
63+
Example with multiple tags:
64+
65+
```bash
66+
./gradlew iT -PincludeTestTags=geb,api
67+
```
68+
4769
## Start a mongo docker container (containers will start by default)
4870
`docker run -d --name mongo-on-docker -p 27017:27017 mongo`

dependencies.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ext {
2525
'ant.version' : '1.10.15',
2626
'asciidoctor-gradle-jvm.version': '4.0.5',
2727
'asciidoctorj.version' : '3.0.0',
28-
'asset-pipeline-gradle.version' : '5.0.32',
28+
'asset-pipeline-gradle.version' : '5.0.34',
2929
'byte-buddy.version' : '1.17.7',
3030
'commons-text.version' : '1.13.1',
3131
'directory-watcher.version' : '0.19.1',
@@ -67,13 +67,13 @@ ext {
6767
]
6868

6969
bomDependencyVersions = [
70-
'asset-pipeline-bom.version' : '5.0.32',
70+
'asset-pipeline-bom.version' : '5.0.34',
7171
'bootstrap-icons.version' : '1.13.1',
7272
'bootstrap.version' : '5.3.8',
7373
'commons-codec.version' : '1.18.0',
7474
'commons-lang3.version' : '3.20.0',
7575
'geb-spock.version' : '8.0.1',
76-
'groovy.version' : '4.0.30',
76+
'groovy.version' : '4.0.31',
7777
'jackson.version' : '2.19.1',
7878
'jquery.version' : '3.7.1',
7979
'liquibase-hibernate5.version': '4.27.0',

etc/bin/verify-cli-distribution.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ echo "Checking Shell CLI ..."
9191
echo "✅ Generated Shell App"
9292

9393
echo "Checking Forge CLI ..."
94-
./grails-forge-cli create-app -x -g mongodb ForgeApp
94+
./grails-forge-cli create-app -x -g mongodb -f gradle-settings-file ForgeApp
9595
echo "✅ Generated Forge App"
9696

9797
echo "✅✅✅ All cli binary distribution checks passed successfully for Apache Grails ${VERSION}."

gradle/functional-test-config.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@ tasks.withType(Test).configureEach { Test task ->
9595
task.outputs.dir rootProject.layout.buildDirectory.dir('mongo-test-serialize')
9696
}
9797

98-
task.useJUnitPlatform()
98+
task.useJUnitPlatform {
99+
if (project.hasProperty('includeTestTags')) {
100+
// Will only run tests that are tagged with specific tags
101+
// e.g. @spock.lang.Tag('geb')
102+
// Run with: ./gradlew iT -PincludeTestTags=geb (comma-separated list)
103+
includeTags((project.property('includeTestTags') as String).split(',')*.trim() as String[])
104+
}
105+
if (project.hasProperty('excludeTestTags')) {
106+
// Will not run tests that are tagged with specific tags
107+
// e.g. @spock.lang.Tag('geb')
108+
// Run with: ./gradlew iT -PincludeTestTags=geb
109+
excludeTags((project.property('excludeTestTags') as String).split(',')*.trim() as String[])
110+
}
111+
}
99112
task.testLogging {
100113
events('passed', 'skipped', 'failed', 'standardOut', 'standardError')
101114
showExceptions = true

grails-geb/src/testFixtures/groovy/grails/plugin/geb/ContainerGebSpec.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import geb.Page
2424
import geb.test.GebTestManager
2525
import spock.lang.Shared
2626
import spock.lang.Specification
27+
import spock.lang.Tag
2728

2829
import grails.plugin.geb.support.ContainerSupport
2930
import grails.plugin.geb.support.ReportingSupport
@@ -55,6 +56,8 @@ import grails.plugin.geb.support.delegate.PageDelegate
5556
* @author James Daugherty
5657
* @since 4.1
5758
*/
59+
@Tag('geb')
60+
@Tag('container-geb')
5861
@CompileStatic
5962
abstract class ContainerGebSpec extends Specification implements ContainerSupport, ReportingSupport, BrowserDelegate, PageDelegate, DriverDelegate, DownloadSupportDelegate {
6063

grails-test-examples/app1/src/integration-test/groovy/functionaltests/AtResourceSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
package functionaltests
2020

2121
import spock.lang.Specification
22+
import spock.lang.Tag
2223

2324
import grails.testing.mixin.integration.Integration
2425
import org.apache.grails.testing.http.client.HttpClientSupport
2526

2627
@Integration
28+
@Tag('http-client')
2729
class AtResourceSpec extends Specification implements HttpClientSupport {
2830

2931
def "A domain class annotated with @Resources exposes an endpoint"() {

grails-test-examples/app1/src/integration-test/groovy/functionaltests/BookRestfulControllerSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
package functionaltests
2020

2121
import spock.lang.Specification
22+
import spock.lang.Tag
2223

2324
import grails.testing.mixin.integration.Integration
2425
import org.apache.grails.testing.http.client.HttpClientSupport
2526

2627
@Integration
28+
@Tag('http-client')
2729
class BookRestfulControllerSpec extends Specification implements HttpClientSupport {
2830

2931
def "A RestfulController exposes an index endpoint for a domain class"() {

grails-test-examples/app1/src/integration-test/groovy/functionaltests/GspInWebappDirSpec.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
package functionaltests
2020

2121
import spock.lang.Specification
22+
import spock.lang.Tag
2223

2324
import grails.testing.mixin.integration.Integration
2425
import org.apache.grails.testing.http.client.HttpClientSupport
2526

2627
@Integration
28+
@Tag('http-client')
2729
class GspInWebappDirSpec extends Specification implements HttpClientSupport {
2830

2931
def 'GSP in src/main/webapp renders'() {

0 commit comments

Comments
 (0)