1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Add test for transportRequestRelease failure for type RFC

This commit is contained in:
Marcus Holl 2019-02-01 13:29:41 +01:00
parent 59bff987d7
commit 6f96f3d87b

View File

@ -163,6 +163,45 @@ public class TransportRequestReleaseTest extends BasePiperTest {
]
}
@Test
public void releaseTransportRequestFailsRFCTest() {
thrown.expect(AbortException)
thrown.expectMessage('Failed releasing transport request.')
nullScript
.commonPipelineEnvironment
.configuration
.general
.changeManagement =
[
credentialsId: 'CM',
type: 'RFC',
endpoint: 'https://example.org/rfc',
rfc: [dockerImage: 'rfc']
]
ChangeManagement cm = new ChangeManagement(nullScript) {
void releaseTransportRequestRFC(
String dockerImage,
List dockerOptions,
String transportRequestId,
String endpoint,
String developmentClient,
String credentialsId) {
throw new ChangeManagementException('Failed releasing transport request.')
}
}
stepRule.step.transportRequestRelease(
script: nullScript,
transportRequestId: '002',
developmentClient: '003',
cmUtils: cm)
}
@Test
public void releaseTransportRequestSanityChecksRFCTest() {