Skip to content

Commit

Permalink
Make API integration test more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Jun 9, 2020
1 parent e7d48d1 commit f797a23
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default function ({ getService }: FtrProviderContext) {
const testDataStreamName = 'test-data-stream';

describe('Get', () => {
before(() => createDataStream(testDataStreamName));
after(() => deleteDataStream(testDataStreamName));
before(async () => await createDataStream(testDataStreamName));
after(async () => await deleteDataStream(testDataStreamName));

describe('all data streams', () => {
it('returns an array of data streams', async () => {
Expand All @@ -67,15 +67,15 @@ export default function ({ getService }: FtrProviderContext) {
.set('kbn-xsrf', 'xxx')
.expect(200);

// ES determines this value so we'll just echo it back.
const { uuid } = dataStreams[0].indices[0];
// ES determines these values so we'll just echo them back.
const { name: indexName, uuid } = dataStreams[0].indices[0];
expect(dataStreams).to.eql([
{
name: testDataStreamName,
timeStampField: '@timestamp',
indices: [
{
name: `${testDataStreamName}-000001`,
name: indexName,
uuid,
},
],
Expand Down

0 comments on commit f797a23

Please sign in to comment.