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:
parent
59bff987d7
commit
6f96f3d87b
@ -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() {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user