Integration test spec proves outputDirectory value is not being honoured when changed using dsl.

This commit is contained in:
Sion Williams
2015-07-27 22:03:19 +01:00
parent 5444253ed6
commit cafa0d6578
3 changed files with 74 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
package com.tools.security.plugin
import nebula.test.IntegrationSpec
import nebula.test.functional.ExecutionResult
/**
* @author Sion Williams
*/
class DependencyCheckGradlePluginIntegSpec extends IntegrationSpec {
def "I can add the plugin to a build with no errors"() {
setup:
buildFile << '''
apply plugin: 'dependency-check'
'''.stripIndent()
when:
ExecutionResult result = runTasksSuccessfully('tasks')
then:
result.standardOutput.contains('dependencyCheck - Produce dependency security report.')
}
def "I can override outputDir with extension"() {
setup:
writeHelloWorld('com.example')
copyResources('outputDir.gradle', 'build.gradle')
when:
runTasksSuccessfully('dependencyCheck')
then:
fileExists('build/dependencyCheckReport')
}
}

View File

@@ -0,0 +1,21 @@
/**
* Build file to exercise dependency check
* @author Sion Williams
*/
apply plugin: 'java'
apply plugin: 'dependency-check'
sourceCompatibility = 1.5
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
}
dependencyCheck {
outputDirectory = "${buildDir}/dependencyCheckReport"
}