@@ -19,6 +19,7 @@ public class SlmApiTests : CoordinatedIntegrationTestBase<XPackCluster>
1919 private const string ExecuteSnapshotLifecycleStep = nameof ( ExecuteSnapshotLifecycleStep ) ;
2020 private const string GetAllSnapshotLifecycleStep = nameof ( GetAllSnapshotLifecycleStep ) ;
2121 private const string GetSnapshotLifecycleStep = nameof ( GetSnapshotLifecycleStep ) ;
22+ private const string GetMissingSnapshotLifecycleStep = nameof ( GetMissingSnapshotLifecycleStep ) ;
2223 private const string GetSnapshotLifecycleAfterExecuteStep = nameof ( GetSnapshotLifecycleAfterExecuteStep ) ;
2324 private const string PutSnapshotLifecycleStep = nameof ( PutSnapshotLifecycleStep ) ;
2425 private const string GetSnapshotLifecycleStats = nameof ( GetSnapshotLifecycleStats ) ;
@@ -76,6 +77,20 @@ public SlmApiTests(XPackCluster cluster, EndpointUsage usage) : base(new Coordin
7677 ( v , c , r ) => c . SnapshotLifecycleManagement . PutSnapshotLifecycleAsync ( r )
7778 )
7879 } ,
80+ {
81+ GetMissingSnapshotLifecycleStep , u =>
82+ u . Calls < GetSnapshotLifecycleDescriptor , GetSnapshotLifecycleRequest , IGetSnapshotLifecycleRequest , GetSnapshotLifecycleResponse > (
83+ v => new GetSnapshotLifecycleRequest ( v + "-missing" )
84+ {
85+ Human = true
86+ } ,
87+ ( v , d ) => d . PolicyId ( v + "-missing" ) . Human ( ) ,
88+ ( v , c , f ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycle ( f ) ,
89+ ( v , c , f ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycleAsync ( f ) ,
90+ ( v , c , r ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycle ( r ) ,
91+ ( v , c , r ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycleAsync ( r )
92+ )
93+ } ,
7994 {
8095 GetSnapshotLifecycleStep , u =>
8196 u . Calls < GetSnapshotLifecycleDescriptor , GetSnapshotLifecycleRequest , IGetSnapshotLifecycleRequest , GetSnapshotLifecycleResponse > (
@@ -166,6 +181,12 @@ [I] public async Task PutSnapshotLifecycleResponse() => await Assert<PutSnapshot
166181 r . ApiCall . HttpStatusCode . Should ( ) . Be ( 200 ) ;
167182 } ) ;
168183
184+ [ I ] public async Task GetMissingSnapshotLifecycleResponse ( ) => await Assert < GetSnapshotLifecycleResponse > ( GetMissingSnapshotLifecycleStep , ( v , r ) =>
185+ {
186+ r . IsValid . Should ( ) . BeFalse ( ) ;
187+ r . ServerError . Should ( ) . NotBeNull ( ) ;
188+ } ) ;
189+
169190 [ I ] public async Task GetSnapshotLifecycleResponse ( ) => await Assert < GetSnapshotLifecycleResponse > ( GetSnapshotLifecycleStep , ( v , r ) =>
170191 {
171192 r . IsValid . Should ( ) . BeTrue ( ) ;
0 commit comments