File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -54,24 +54,15 @@ function build (opts = {}) {
54
54
}
55
55
56
56
try {
57
- const { body : templates } = await client . indices . getTemplate ( )
58
- await helper . runInParallel (
59
- client , 'indices.deleteTemplate' ,
60
- Object . keys ( templates ) . map ( t => ( { name : t } ) )
61
- )
57
+ await client . indices . deleteTemplate ( { name : '*' } )
62
58
} catch ( err ) {
63
59
assert . ifError ( err , 'should not error: indices.deleteTemplate' )
64
60
}
65
61
66
62
try {
67
63
const { body : repositories } = await client . snapshot . getRepository ( )
68
64
for ( const repository of Object . keys ( repositories ) ) {
69
- const { body : snapshots } = await client . snapshot . get ( { repository, snapshot : '_all' } )
70
- await helper . runInParallel (
71
- client , 'snapshot.delete' ,
72
- Object . keys ( snapshots ) . map ( snapshot => ( { snapshot, repository } ) ) ,
73
- { ignore : [ 404 ] }
74
- )
65
+ await client . snapshot . delete ( { repository, snapshot : '*' } , { ignore : [ 404 ] } )
75
66
await client . snapshot . deleteRepository ( { repository } , { ignore : [ 404 ] } )
76
67
}
77
68
} catch ( err ) {
You can’t perform that action at this time.
0 commit comments