@@ -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 GetSnapshotLifecycleAfterExecuteStep = nameof ( GetSnapshotLifecycleAfterExecuteStep ) ;
2223 private const string PutSnapshotLifecycleStep = nameof ( PutSnapshotLifecycleStep ) ;
2324
2425
@@ -101,6 +102,20 @@ public SlmApiTests(XPackCluster cluster, EndpointUsage usage) : base(new Coordin
101102 ( v , c , r ) => c . SnapshotLifecycleManagement . ExecuteSnapshotLifecycleAsync ( r )
102103 )
103104 } ,
105+ {
106+ GetSnapshotLifecycleAfterExecuteStep , u =>
107+ u . Calls < GetSnapshotLifecycleDescriptor , GetSnapshotLifecycleRequest , IGetSnapshotLifecycleRequest , GetSnapshotLifecycleResponse > (
108+ v => new GetSnapshotLifecycleRequest ( v )
109+ {
110+ Human = true
111+ } ,
112+ ( v , d ) => d . PolicyId ( v ) . Human ( ) ,
113+ ( v , c , f ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycle ( f ) ,
114+ ( v , c , f ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycleAsync ( f ) ,
115+ ( v , c , r ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycle ( r ) ,
116+ ( v , c , r ) => c . SnapshotLifecycleManagement . GetSnapshotLifecycleAsync ( r )
117+ )
118+ } ,
104119 {
105120 DeleteSnapshotLifecycleStep , u =>
106121 u . Calls < DeleteSnapshotLifecycleDescriptor , DeleteSnapshotLifecycleRequest , IDeleteSnapshotLifecycleRequest ,
@@ -161,6 +176,20 @@ [I] public async Task ExecuteSnapshotLifecycleResponse() => await Assert<Execute
161176 r . SnapshotName . Should ( ) . NotBeNull ( ) ;
162177 } ) ;
163178
179+ [ I ] public async Task GetSnapshotLifeCycleAfterExecuteResponse ( ) => await Assert < GetSnapshotLifecycleResponse > ( GetSnapshotLifecycleAfterExecuteStep , ( v , r ) =>
180+ {
181+ r . IsValid . Should ( ) . BeTrue ( ) ;
182+ r . Policies . Should ( ) . NotBeNull ( ) . And . HaveCount ( 1 ) . And . ContainKey ( v ) ;
183+
184+ var metadata = r . Policies [ v ] ;
185+ metadata . InProgress . Should ( ) . NotBeNull ( ) ;
186+ metadata . InProgress . Name . Should ( ) . NotBeNullOrWhiteSpace ( ) ;
187+ metadata . InProgress . UUID . Should ( ) . NotBeNullOrWhiteSpace ( ) ;
188+ metadata . InProgress . State . Should ( ) . NotBeNullOrWhiteSpace ( ) ;
189+ metadata . InProgress . StartTime . Should ( ) . BeAfter ( DateTimeOffset . MinValue ) ;
190+
191+ } ) ;
192+
164193 [ I ] public async Task DeleteSnapshotLifecycleResponse ( ) => await Assert < DeleteSnapshotLifecycleResponse > ( DeleteSnapshotLifecycleStep ,
165194 ( v , r ) =>
166195 {
0 commit comments