Skip to content

Commit

Permalink
remove can update index_pattern fields test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Jan 4, 2021
1 parent 67298aa commit 086f421
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,44 +262,6 @@ export default function ({ getService }: FtrProviderContext) {
expect(response3.body.index_pattern.typeMeta).to.eql({ foo: 'baz' });
});

it('can update index_pattern fields', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
const response1 = await supertest.post('/api/index_patterns/index_pattern').send({
index_pattern: {
title,
fields: {
foo: {
name: 'foo',
type: 'string',
},
},
},
});

expect(response1.body.index_pattern.fields.foo.name).to.be('foo');
expect(response1.body.index_pattern.fields.foo.type).to.be('string');

const id = response1.body.index_pattern.id;
const response2 = await supertest.post('/api/index_patterns/index_pattern/' + id).send({
index_pattern: {
fields: {
bar: {
name: 'bar',
type: 'number',
},
},
},
});

expect(response2.body.index_pattern.fields.bar.name).to.be('bar');
expect(response2.body.index_pattern.fields.bar.type).to.be('number');

const response3 = await supertest.get('/api/index_patterns/index_pattern/' + id);

expect(response3.body.index_pattern.fields.bar.name).to.be('bar');
expect(response3.body.index_pattern.fields.bar.type).to.be('number');
});

it('can update multiple index pattern fields at once', async () => {
const title = `foo-${Date.now()}-${Math.random()}*`;
const response1 = await supertest.post('/api/index_patterns/index_pattern').send({
Expand Down

0 comments on commit 086f421

Please sign in to comment.