@@ -79,7 +79,7 @@ func TestRestores(t *testing.T) {
7979 t .Log (string (resp ))
8080 })
8181
82- t .Run ("Restores Create" , func (t * testing.T ) {
82+ t .Run ("Restores Create - Automated " , func (t * testing.T ) {
8383 cmd := exec .Command (cliPath ,
8484 backupsEntity ,
8585 restoresEntity ,
@@ -161,6 +161,45 @@ func TestRestores(t *testing.T) {
161161 assert .NotEmpty (t , result )
162162 })
163163
164+ t .Run ("Restores Create - Download" , func (t * testing.T ) {
165+ cmd := exec .Command (cliPath ,
166+ backupsEntity ,
167+ restoresEntity ,
168+ "start" ,
169+ "download" ,
170+ "--clusterName" ,
171+ g .clusterName ,
172+ "--snapshotId" ,
173+ snapshotID ,
174+ "--projectId" ,
175+ g .projectID ,
176+ "-o=json" )
177+ cmd .Env = os .Environ ()
178+ resp , err := e2e .RunAndGetStdOut (cmd )
179+
180+ require .NoError (t , err , string (resp ))
181+ var result atlasv2.DiskBackupSnapshotRestoreJob
182+ require .NoError (t , json .Unmarshal (resp , & result ))
183+ restoreJobID = result .GetId ()
184+ })
185+
186+ t .Run ("Restores Watch - Download" , func (t * testing.T ) {
187+ cmd := exec .Command (cliPath ,
188+ backupsEntity ,
189+ restoresEntity ,
190+ "watch" ,
191+ restoreJobID ,
192+ "--clusterName" ,
193+ g .clusterName ,
194+ "--projectId" ,
195+ g .projectID ,
196+ "-o=json" )
197+ cmd .Env = os .Environ ()
198+ resp , err := e2e .RunAndGetStdOut (cmd )
199+
200+ require .NoError (t , err , string (resp ))
201+ })
202+
164203 t .Run ("Delete snapshot" , func (t * testing.T ) {
165204 cmd := exec .Command (cliPath ,
166205 backupsEntity ,
0 commit comments