@@ -19,6 +19,7 @@ public class SlmApiTests : CoordinatedIntegrationTestBase<XPackCluster>
19
19
private const string ExecuteSnapshotLifecycleStep = nameof ( ExecuteSnapshotLifecycleStep ) ;
20
20
private const string GetAllSnapshotLifecycleStep = nameof ( GetAllSnapshotLifecycleStep ) ;
21
21
private const string GetSnapshotLifecycleStep = nameof ( GetSnapshotLifecycleStep ) ;
22
+ private const string GetSnapshotLifecycleAfterExecuteStep = nameof ( GetSnapshotLifecycleAfterExecuteStep ) ;
22
23
private const string PutSnapshotLifecycleStep = nameof ( PutSnapshotLifecycleStep ) ;
23
24
24
25
@@ -101,6 +102,20 @@ public SlmApiTests(XPackCluster cluster, EndpointUsage usage) : base(new Coordin
101
102
( v , c , r ) => c . SnapshotLifecycleManagement . ExecuteSnapshotLifecycleAsync ( r )
102
103
)
103
104
} ,
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
+ } ,
104
119
{
105
120
DeleteSnapshotLifecycleStep , u =>
106
121
u . Calls < DeleteSnapshotLifecycleDescriptor , DeleteSnapshotLifecycleRequest , IDeleteSnapshotLifecycleRequest ,
@@ -161,6 +176,20 @@ [I] public async Task ExecuteSnapshotLifecycleResponse() => await Assert<Execute
161
176
r . SnapshotName . Should ( ) . NotBeNull ( ) ;
162
177
} ) ;
163
178
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
+
164
193
[ I ] public async Task DeleteSnapshotLifecycleResponse ( ) => await Assert < DeleteSnapshotLifecycleResponse > ( DeleteSnapshotLifecycleStep ,
165
194
( v , r ) =>
166
195
{
0 commit comments