@@ -96,7 +96,7 @@ func TestFlexBackup(t *testing.T) {
9696
9797 var restoreJobID string
9898
99- t .Run ("Restores Create" , func (t * testing.T ) {
99+ t .Run ("Restores Create - Automated " , func (t * testing.T ) {
100100 cmd := exec .Command (cliPath ,
101101 backupsEntity ,
102102 restoresEntity ,
@@ -170,6 +170,47 @@ func TestFlexBackup(t *testing.T) {
170170 assert .NotEmpty (t , result )
171171 })
172172
173+ t .Run ("Restores Create - Download" , func (t * testing.T ) {
174+ cmd := exec .Command (cliPath ,
175+ backupsEntity ,
176+ restoresEntity ,
177+ "start" ,
178+ "download" ,
179+ "--clusterName" ,
180+ clusterName ,
181+ "--snapshotId" ,
182+ snapshotID ,
183+ "--targetClusterName" ,
184+ g .clusterName ,
185+ "--targetProjectId" ,
186+ g .projectID ,
187+ "-o=json" )
188+ cmd .Env = os .Environ ()
189+ resp , err := e2e .RunAndGetStdOut (cmd )
190+
191+ require .NoError (t , err , string (resp ))
192+ var result atlasv2.FlexBackupRestoreJob20241113
193+ require .NoError (t , json .Unmarshal (resp , & result ), string (resp ))
194+ restoreJobID = result .GetId ()
195+ t .Log ("snapshotID" , restoreJobID )
196+ require .NotEmpty (t , restoreJobID )
197+ })
198+
199+ t .Run ("Restores Watch - Download" , func (t * testing.T ) {
200+ cmd := exec .Command (cliPath ,
201+ backupsEntity ,
202+ restoresEntity ,
203+ "watch" ,
204+ restoreJobID ,
205+ "--clusterName" ,
206+ clusterName ,
207+ "-o=json" )
208+ cmd .Env = os .Environ ()
209+ resp , err := e2e .RunAndGetStdOut (cmd )
210+
211+ require .NoError (t , err , string (resp ))
212+ })
213+
173214 t .Run ("Delete flex cluster" , func (t * testing.T ) {
174215 cmd := exec .Command (cliPath ,
175216 clustersEntity ,
0 commit comments