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

Enable tests that were disabled before grails-gsp was migrated to jakarta-servlet #13590

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ spockVersion=2.3-groovy-4.0
springBootVersion=3.2.6
springLoadedVersion=1.2.8.RELEASE
springVersion=6.1.8
testingSupportVersion=3.2.1
testingSupportVersionForTests=3.2.2
testingSupportVersion=4.0.0-SNAPSHOT
testingSupportVersionForTests=4.0.0-SNAPSHOT
tomcatLog4jVersion=8.5.2
tomcatVersion=10.1.25
viewsVersion=3.2.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ package grails.test.mixin
import grails.testing.web.controllers.ControllerUnitTest
import org.grails.plugins.testing.GrailsMockMultipartFile
import org.grails.web.servlet.mvc.SynchronizerTokensHolder
import spock.lang.Ignore
import spock.lang.Specification

/**
* @author Graeme Rocher
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class AstEnhancedControllerUnitTestMixinTests extends Specification implements ControllerUnitTest<AnotherController> {

void setup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import grails.artefact.Artefact
import grails.testing.web.controllers.ControllerUnitTest;
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
import spock.lang.Ignore
import spock.lang.Specification

/**
* Tests that services can be autowired into controllers via defineBeans
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class AutowireServiceViaDefineBeansTests extends Specification implements ControllerUnitTest<SpringController> {

void testThatBeansAreWired() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ package grails.test.mixin

import grails.artefact.Artefact
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore
import spock.lang.Specification

/**
* @author Graeme Rocher
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class ControllerAndGroovyPageMixinTests extends Specification implements ControllerUnitTest<MyController> {

// GRAILS-9718
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package grails.test.mixin

import grails.testing.web.GrailsWebUnitTest
import spock.lang.Ignore
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class ControllerMockWithMultipleControllersSpec extends Specification implements GrailsWebUnitTest {

void "Test that both mocked controllers are valid"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import grails.persistence.Entity
import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import org.springframework.web.servlet.support.RequestContextUtils
import spock.lang.Ignore
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class ControllerTestForTests extends Specification implements ControllerUnitTest<SimpleController>, DomainUnitTest<Simple> {

void testIndex() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import org.grails.web.servlet.mvc.SynchronizerTokensHolder
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.MessageSource
import org.springframework.web.multipart.MultipartFile
import spock.lang.Ignore
import spock.lang.Specification

import jakarta.servlet.http.HttpServletResponse
Expand All @@ -22,7 +21,6 @@ import jakarta.servlet.http.HttpServletResponse
*
* @author Graeme Rocher
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class ControllerUnitTestMixinTests extends Specification implements ControllerUnitTest<TestController> {

void testRenderText() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ package grails.test.mixin

import grails.artefact.Artefact
import grails.testing.web.controllers.ControllerUnitTest
import org.junit.Test
import spock.lang.Ignore
import spock.lang.Specification

/**
* Tests a controller with a mock collaborator
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class ControllerWithMockCollabTests extends Specification implements ControllerUnitTest<ControllerWithCollabController> {

void testFirstCall() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import grails.converters.XML
import grails.persistence.Entity
import grails.testing.gorm.DataTest
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore
import spock.lang.Specification

/**
* A Junit 4 test that tests a scaffolded controllers logic using the new mixins
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class DomainClassControllerUnitTestMixinTests extends Specification implements ControllerUnitTest<BookController>, DataTest {

void setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package grails.test.mixin

import grails.artefact.Artefact
import grails.testing.web.GrailsWebUnitTest
import spock.lang.Ignore
import spock.lang.Issue
import spock.lang.Specification

/**
* @author Graeme Rocher
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class GroovyPageUnitTestMixinTests extends Specification implements GrailsWebUnitTest {

void setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package grails.test.mixin

import grails.testing.web.GrailsWebUnitTest
import spock.lang.Ignore
import spock.lang.Issue
import spock.lang.Specification


@Ignore('grails-gsp is not on jakarta.servlet yet')
class GroovyPageUnitTestMixinWithCustomViewDirSpec extends Specification implements GrailsWebUnitTest {

Closure doWithConfig() {{ c ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ package grails.test.mixin

import grails.artefact.Interceptor
import grails.testing.web.interceptor.InterceptorUnitTest
import spock.lang.Ignore
import spock.lang.Specification

/**
* Created by graemerocher on 02/09/15.
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class InterceptorUnitTestMixinSpec extends Specification implements InterceptorUnitTest<TestInterceptor> {

void "Test interceptor matching"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import grails.web.api.WebAttributes
import grails.web.databinding.DataBinder

import org.codehaus.groovy.control.CompilerConfiguration
import spock.lang.Ignore
import spock.lang.Shared
import spock.lang.Specification
/**
* @author Graeme Rocher
*/
//TODO: Replace ControllerUnitTest<Object> with ControllerUnitTest once update to Groovy 3.0.7
@Ignore('grails-gsp is not on jakarta.servlet yet')
class ResourceAnnotationRestfulControllerSpec extends Specification implements DataTest, ControllerUnitTest<Object> {

@Shared Class domainClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package grails.test.mixin
import grails.gorm.transactions.Transactional
import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore

import static org.springframework.http.HttpStatus.*
import grails.artefact.Artefact
Expand All @@ -13,7 +12,6 @@ import spock.lang.Specification
/**
* @video Graeme Rocher
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class RestfulControllerSpec extends Specification implements ControllerUnitTest<VideoController>, DomainUnitTest<Video> {

def populateValidParams(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import grails.persistence.Entity
import grails.rest.RestfulController
import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore
import spock.lang.Issue
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class RestfulControllerSubclassSpec extends Specification implements ControllerUnitTest<ArtistController>, DomainUnitTest<Album> {

void 'Test that save populates the newly created instance with values from the request body'() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2012 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -21,12 +21,10 @@ import grails.rest.RestfulController
import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import org.springframework.http.HttpStatus
import spock.lang.Ignore
import spock.lang.Specification

/**
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class RestfulControllerSuperClassSpec extends Specification implements ControllerUnitTest<SecondVideoController>, DomainUnitTest<Video> {

def populateValidParams(params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright 2012 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -19,12 +19,10 @@ package grails.test.mixin
import grails.testing.web.controllers.ControllerUnitTest
import org.junit.FixMethodOrder
import org.junit.runners.MethodSorters
import spock.lang.Ignore
import spock.lang.Specification

/**
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class SetupTeardownInvokeTests extends Specification implements ControllerUnitTest<SetupTeardownController> {
static int counter=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package grails.test.mixin
import grails.artefact.TagLibrary
import grails.gsp.TagLib
import grails.testing.web.taglib.TagLibUnitTest
import spock.lang.Ignore
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class TagLibraryInvokeBodySpec extends Specification implements TagLibUnitTest<SimpleTagLib> {

void "Test that a tag can be invoked with a custom body"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package grails.test.mixin
import grails.artefact.Artefact
import grails.persistence.Entity
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class TestForControllerWithoutMockDomainTests extends Specification implements ControllerUnitTest<ImpedimentsController> {

void testEditImpediment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ import grails.testing.gorm.DataTest
import grails.testing.web.controllers.ControllerUnitTest
import grails.persistence.Entity
import grails.artefact.Artefact
import spock.lang.Ignore
import spock.lang.Specification

/**
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class UnitTestDataBindingAssociatonTests extends Specification implements ControllerUnitTest<ShipController>, DataTest {

void setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import grails.testing.web.GrailsWebUnitTest
import grails.testing.web.UrlMappingsUnitTest
import junit.framework.ComparisonFailure
import org.springframework.web.context.WebApplicationContext
import spock.lang.Ignore
import spock.lang.Issue
import spock.lang.Specification

Expand Down Expand Up @@ -108,7 +107,6 @@ class AnotherUrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class AnotherUrlMappingsSpec extends Specification implements UrlMappingsUnitTest<AnotherUrlMappings> {

Class[] getControllersToMock() {
Expand Down Expand Up @@ -157,7 +155,6 @@ class MyUrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class MyUrlMappingsSpec extends Specification implements UrlMappingsUnitTest<MyUrlMappings> {

Class[] getControllersToMock() {
Expand Down Expand Up @@ -189,7 +186,6 @@ class GRAILS5222UrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class GRAILS5222UrlMappingsSpec extends Specification implements UrlMappingsUnitTest<GRAILS5222UrlMappings> {

Class[] getControllersToMock() {
Expand All @@ -214,7 +210,6 @@ class GRAILS9863UrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class GRAILS9863UrlMappingsSpec extends Specification implements UrlMappingsUnitTest<GRAILS9863UrlMappings> {

@Issue("https://github.com/grails/grails-core/issues/9863")
Expand All @@ -241,7 +236,6 @@ class GRAILS9110UrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class GRAILS9110UrlMappingsSpec extends Specification implements UrlMappingsUnitTest<GRAILS9110UrlMappings> {

Class[] getControllersToMock() {
Expand Down Expand Up @@ -279,7 +273,6 @@ class MethodTestUrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class MethodTestUrlMappingsSpec extends Specification implements UrlMappingsUnitTest<MethodTestUrlMappings> {

Class[] getControllersToMock() {
Expand Down Expand Up @@ -313,7 +306,6 @@ class ResourceTestUrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class ResourceTestUrlMappingsSpec extends Specification implements UrlMappingsUnitTest<ResourceTestUrlMappings> {

Class[] getControllersToMock() {
Expand Down Expand Up @@ -371,7 +363,6 @@ class ExceptionTestUrlMappings {
}
}

@Ignore('grails-gsp is not on jakarta.servlet yet')
class ExceptionTestUrlMappingsSpec extends Specification implements UrlMappingsUnitTest<ExceptionTestUrlMappings> {

Class[] getControllersToMock() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.grails.web.metaclass

import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import spock.lang.Ignore
import spock.lang.Specification

import grails.artefact.Artefact
Expand All @@ -14,7 +13,6 @@ import org.grails.web.servlet.GrailsFlashScope
* @author Graeme Rocher
* @since 1.0
*/
@Ignore('grails-gsp is not on jakarta.servlet yet')
class ChainMethodTests extends Specification implements ControllerUnitTest<TestChainController>, DomainUnitTest<TestChainBook> {

void testChainMethodWithModel() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@


package org.grails.web.metaclass

import grails.testing.gorm.DomainUnitTest
import grails.testing.web.controllers.ControllerUnitTest
import grails.util.MockRequestDataValueProcessor

import org.grails.web.servlet.GrailsFlashScope
import spock.lang.Ignore
import spock.lang.Specification

@Ignore('grails-gsp is not on jakarta.servlet yet')
class ChainMethodWithRequestDataValueProcessorSpec extends Specification implements ControllerUnitTest<TestChainController>, DomainUnitTest<TestChainBook> {

Closure doWithSpring() {{ ->
Expand Down
Loading
Loading