Skip to content

Commit

Permalink
Fix fixture usage in integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
eskatos committed Apr 5, 2023
1 parent 8ca0693 commit 9b90224
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,19 @@ class JavaApplicationInitSoakTest extends AbstractIntegrationSpec {
def "toolchain auto-provisioning works"() {
given:
useTestDirectoryThatIsNotEmbeddedInAnotherBuild()
def initDir = createDir('initDir')
executer.beforeExecute {
requireOwnGradleUserHomeDir()
}

when:
executer
.inDirectory(initDir)
.withTasks('init', '--type', 'java-application', '--dsl', 'kotlin')
.run()
succeeds('init', '--type', 'java-application', '--dsl', 'groovy')

and:
def result = executer
.inDirectory(initDir)
.requireOwnGradleUserHomeDir()
.withArgument("-Porg.gradle.java.installations.auto-detect=false")
.withArgument("-Porg.gradle.java.installations.auto-download=true")
.withTasks('run')
.run()
executer.withArgument("-Porg.gradle.java.installations.auto-detect=false")
executer.withArgument("-Porg.gradle.java.installations.auto-download=true")
succeeds('run')

then:
result.assertOutputContains("Hello World!")
outputContains("Hello World!")
}
}

0 comments on commit 9b90224

Please sign in to comment.