mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-05-02 05:04:29 +02:00
Integration test spec proves outputDirectory value is not being honoured when changed using dsl.
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user