From aa09b3b9f378f22dad1576ef0dc7fbdf65e4225a Mon Sep 17 00:00:00 2001 From: Stefan Wolf Date: Thu, 4 Jul 2019 17:31:43 +0200 Subject: [PATCH] Fix tests (hopefully) --- .../plugins/gradle/BuildScanIntegrationTest.groovy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/test/groovy/hudson/plugins/gradle/BuildScanIntegrationTest.groovy b/src/test/groovy/hudson/plugins/gradle/BuildScanIntegrationTest.groovy index a855e067..583bb217 100644 --- a/src/test/groovy/hudson/plugins/gradle/BuildScanIntegrationTest.groovy +++ b/src/test/groovy/hudson/plugins/gradle/BuildScanIntegrationTest.groovy @@ -59,19 +59,17 @@ class BuildScanIntegrationTest extends AbstractIntegrationTest { def 'detects build scan in pipeline log'() { given: - gradleInstallationRule.gradleVersion = '5.1' + gradleInstallationRule.gradleVersion = '5.5' gradleInstallationRule.addInstallation() def pipelineJob = j.createProject(WorkflowJob) pipelineJob.setDefinition(new CpsFlowDefinition(""" node { - def gradleHome - stage('Preparation') { - gradleHome = tool '${gradleInstallationRule.gradleVersion}' - } stage('Build') { // Run the maven build + def gradleHome = tool name: '${gradleInstallationRule.gradleVersion}', type: 'gradle' + writeFile file: 'settings.gradle', text: '' + writeFile file: 'build.gradle', text: "buildScan { termsOfServiceUrl = 'https://gradle.com/terms-of-service'; termsOfServiceAgree = 'yes' }" if (isUnix()) { - sh 'touch settings.gradle' sh "'\${gradleHome}/bin/gradle' help --scan" } else { bat(/"\${gradleHome}\\bin\\gradle.bat" help --scan/)