diff --git a/app1/src/integration-test/groovy/functionaltests/UploadControllerSpec.groovy b/app1/src/integration-test/groovy/functionaltests/UploadControllerSpec.groovy index f1c3d426..03ee4a92 100644 --- a/app1/src/integration-test/groovy/functionaltests/UploadControllerSpec.groovy +++ b/app1/src/integration-test/groovy/functionaltests/UploadControllerSpec.groovy @@ -3,6 +3,7 @@ package functionaltests import grails.plugin.geb.ContainerGebSpec import grails.testing.mixin.integration.Integration +import org.testcontainers.images.builder.Transferable import spock.lang.PendingFeature /** @@ -10,35 +11,30 @@ import spock.lang.PendingFeature @Integration(applicationClass = Application) class UploadControllerSpec extends ContainerGebSpec { - @PendingFeature(reason='text is null') + @PendingFeature(reason='https://github.com/grails/grails-core/issues/13849') void "Test file upload"() { when:"When go to an upload page" - go "/upload/index" + go "/upload/index" - def f = File.createTempFile("uploadtest", "txt") - f.deleteOnExit() - f.text = "Test upload" - def form = $('#myForm') + getContainer().copyFileToContainer(Transferable.of("Test upload", 0777), "/test.txt") + def form = $('#myForm') - form.myFile = f.absolutePath - $('#input1').click() + form.myFile = "/test.txt" + $('#input1').click() then:"The file is uploaded" - $('p').text() == 'Test upload' - + $('p').text() == 'Test upload' } - @PendingFeature(reason='text is null') + @PendingFeature(reason='https://github.com/grails/grails-core/issues/13849') void "Test file upload parameters"() { when:"When go to an upload page" go "/upload/index" - def f = File.createTempFile("uploadtest", "txt") - f.deleteOnExit() - f.text = "Test upload" + getContainer().copyFileToContainer(Transferable.of("Test upload", 0777), "/test.txt") def form = $('#myForm2') - form.myFile = f.absolutePath + form.myFile = "/test.txt" $('#input2').click() then:"The file is uploaded" diff --git a/app1/src/test/groovy/functionaltests/BookHibernateSpec.groovy b/app1/src/test/groovy/functionaltests/BookHibernateSpec.groovy index 79ccb53a..d699be3d 100644 --- a/app1/src/test/groovy/functionaltests/BookHibernateSpec.groovy +++ b/app1/src/test/groovy/functionaltests/BookHibernateSpec.groovy @@ -1,13 +1,10 @@ package functionaltests -import spock.lang.Ignore - class BookHibernateSpec extends grails.test.hibernate.HibernateSpec { def setup() { new Book(title: 'foo').save() } - @Ignore('Either class [functionaltests.Book] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity.') void "Test that dynamic finders work"() { expect:"The book validates" Book.count() == 1