1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Add step test: transportRequestRelease for CTS fails

This commit is contained in:
Marcus Holl 2019-02-05 17:29:45 +01:00
parent 6f96f3d87b
commit d8b0de3735

View File

@ -89,7 +89,7 @@ public class TransportRequestReleaseTest extends BasePiperTest {
}
@Test
public void releaseTransportRequestFailureTest() {
public void releaseTransportRequestFailsSOLMANTest() {
thrown.expect(AbortException)
thrown.expectMessage("Something went wrong")
@ -110,6 +110,37 @@ public class TransportRequestReleaseTest extends BasePiperTest {
stepRule.step.transportRequestRelease(script: nullScript, changeDocumentId: '001', transportRequestId: '001', cmUtils: cm)
}
@Test
public void releaseTransportRequestFailsCTSTest() {
thrown.expect(AbortException)
thrown.expectMessage("Something went wrong")
nullScript
.commonPipelineEnvironment
.configuration
.general
.changeManagement
.type = 'CTS'
ChangeManagement cm = new ChangeManagement(nullScript) {
void releaseTransportRequestCTS(
String transportRequestId,
String endpoint,
String credentialsId,
String clientOpts) {
throw new ChangeManagementException('Something went wrong')
}
}
stepRule.step.transportRequestRelease(
script: nullScript,
transportRequestId: '001',
cmUtils: cm)
}
@Test
public void releaseTransportRequestSuccessRFCTest() {