Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: All tests working except GORM Inheritance #589

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: check -Dgeb.env=chromeHeadless -x test -x integrationTest
arguments: check -Dgeb.env=chromeHeadless

build_project:
runs-on: ubuntu-latest
Expand All @@ -48,7 +48,7 @@ jobs:
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: build -Dgeb.env=chromeHeadless -x test -x integrationTest
arguments: build -Dgeb.env=chromeHeadless

- name: Publish Snapshot artifacts to Artifactory (repo.grails.org)
if: success()
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ allprojects {

version = rootProject.version
repositories {
mavenLocal() // Used by Groovy Joint workflow github action after building Groovy
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
// mavenLocal() // Keep, this will be uncommented and used by CI (groovy-joint-workflow)
if (libs.versions.groovy.get().endsWith('-SNAPSHOT')) {
maven {
name = 'JFrog Groovy snapshot repo'
Expand Down
2 changes: 1 addition & 1 deletion examples/functional-tests-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'org.grails.grails-plugin'
//id 'org.grails.plugins.views-json'
id 'org.grails.plugins.views-json'
}

group = 'functional.tests.plugin'
Expand Down
15 changes: 8 additions & 7 deletions examples/functional-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ group = 'functional.tests'

dependencies {


implementation project(':examples-functional-tests-plugin')
implementation project(':views-json')
implementation project(':views-markup')

runtimeOnly project(':views-json-templates')

testImplementation project(':views-json-testing-support')

implementation 'org.grails:grails-core'
implementation 'org.grails:grails-logging'
implementation 'org.grails:grails-web-boot'
Expand All @@ -38,14 +33,20 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
implementation libs.jakarta.servlet.api

compileOnly libs.jakarta.servlet.api // Provided by Tomcat

runtimeOnly project(':views-json-templates')
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
runtimeOnly libs.assetpipeline

testImplementation project(':views-json-testing-support')
testImplementation libs.grails.testing.support.core
testImplementation libs.micronaut.http.client

integrationTestImplementation libs.jackson.databind
integrationTestImplementation libs.micronaut.http.client
integrationTestImplementation libs.micronaut.jackson.databind
}

assets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class BookController extends RestfulController<Book> {
[books: listAllResources(params)]
}


def listExcludesRespond() {
respond([books: listAllResources(params)])
}
Expand All @@ -34,7 +33,7 @@ class BookController extends RestfulController<Book> {
}

def nonStandardTemplate() {
respond([book: new Book(title: 'template found'), custom: new CustomClass(name: "Sally")], view:'/non-standard/template')
respond([book: new Book(title: 'template found'), custom: new CustomClass(name: 'Sally')], view:'/non-standard/template')
}

def showWithParams() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Garage {

String owner

static hasMany = [vehicles: Vehicle]
// GORM Inheritance not working in Groovy 4
//static hasMany = [vehicles: Vehicle]

}
3 changes: 3 additions & 0 deletions examples/functional-tests/grails-app/init/BootStrap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ class BootStrap {

new Proxy(name: "Sally").save(flush: true, failOnError: true)

// GORM inheritance not working in Groovy 4
matrei marked this conversation as resolved.
Show resolved Hide resolved
/*
new Garage(owner: "Jay Leno")
.addToVehicles(new Bus(maxPassengers: 30, route: "around town"))
.addToVehicles(new Car(maxPassengers: 4, make: "Subaru", model: "WRX", year: 2016))
.save(flush: true, failOnError: true)
*/

new Customer(name: "Nokia")
.addToSites(new Site(name: "Salo"))
Expand Down
Loading
Loading