Skip to content

Commit

Permalink
Merge pull request IBM#26 from BOLTONST/test_jcenter_dep
Browse files Browse the repository at this point in the history
Test external jcenter dependency
  • Loading branch information
banjaxxer authored and GitHub Enterprise committed Aug 8, 2019
2 parents 95346ce + fd2ec12 commit 1f9e3fb
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions src/test/groovy/com/ibm/cics/cbgp/ChecksAndCopyTests.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.ibm.cics.cbgp



/*-
* #%L
* CICS Bundle Gradle Plugin
Expand Down Expand Up @@ -39,6 +37,43 @@ class ChecksAndCopyTests extends Specification {
buildFile = testProjectDir.newFile('build.gradle')
}

def "Test jcenter central external module dependency"() {
given:
settingsFile << "rootProject.name = 'cics-bundle-gradle'"
buildFile << """\
plugins {
id 'cics-bundle-gradle-plugin'
}
version '1.0.0-SNAPSHOT'
repositories {
jcenter()
}
configurations {
cicsBundle
}
dependencies {
cicsBundle('javax.servlet:javax.servlet-api:3.1.0@jar')
}
"""

when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
.withArguments('buildCICSBundle')
.withPluginClasspath()
.build()
printTestOutput(result,"Test jcenter central external module dependency")

then:
assert result.output.contains('javax.servlet-api-3.1.0.jar')
assert (getFileInBuildOutputFolder('/javax.servlet-api-3.1.0.jar').exists())
result.task(":buildCICSBundle").outcome == SUCCESS
}

def "Test maven central external module dependency"() {
given:
settingsFile << "rootProject.name = 'cics-bundle-gradle'"
Expand Down

0 comments on commit 1f9e3fb

Please sign in to comment.