Skip to content

Commit 4cdb4c4

Browse files
committed
Attempt to stabilize cloneIndex integration tests
1 parent a1bd35f commit 4cdb4c4

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

  • src/core/server/saved_objects/migrationsv2/integration_tests

src/core/server/saved_objects/migrationsv2/integration_tests/actions.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,17 @@ describe('migration actions', () => {
209209
describe('cloneIndex', () => {
210210
afterEach(async () => {
211211
try {
212-
await client.indices.delete({ index: 'yellow_then_green_index' });
212+
await client.indices.delete({ index: 'clone_*' });
213213
} catch (e) {
214214
/** ignore */
215215
}
216216
});
217217
it('resolves right if cloning into a new target index', () => {
218-
const task = cloneIndex(client, 'existing_index_with_write_block', 'yellow_then_green_index');
218+
const task = cloneIndex(
219+
client,
220+
'existing_index_with_write_block',
221+
'clone_yellow_then_green_index_1'
222+
);
219223
expect(task()).resolves.toMatchInlineSnapshot(`
220224
Object {
221225
"_tag": "Right",
@@ -229,7 +233,7 @@ describe('migration actions', () => {
229233
it('resolves right after waiting for index status to be green if clone target already existed', async () => {
230234
// Create a yellow index
231235
await client.indices.create({
232-
index: 'yellow_then_green_index',
236+
index: 'clone_yellow_then_green_index_2',
233237
body: {
234238
mappings: { properties: {} },
235239
settings: {
@@ -243,7 +247,7 @@ describe('migration actions', () => {
243247
const cloneIndexPromise = cloneIndex(
244248
client,
245249
'existing_index_with_write_block',
246-
'yellow_then_green_index'
250+
'clone_yellow_then_green_index_2'
247251
)();
248252
let indexGreen = false;
249253

@@ -273,7 +277,7 @@ describe('migration actions', () => {
273277
});
274278
});
275279
it('resolves left index_not_found_exception if the source index does not exist', () => {
276-
const task = cloneIndex(client, 'no_such_index', 'yellow_then_green_index');
280+
const task = cloneIndex(client, 'no_such_index', 'clone_yellow_then_green_index_3');
277281
expect(task()).resolves.toMatchInlineSnapshot(`
278282
Object {
279283
"_tag": "Left",

0 commit comments

Comments
 (0)