Skip to content

Commit

Permalink
[Data Discovery] Unskip and fix Serverless API integration tests (#16…
Browse files Browse the repository at this point in the history
…8116)

## Summary

This PR unskips and fixes previously flaky Serverless API integration
tests.

Flaky test runs:
- x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3364

Resolves #165868.
Resolves #165944.
Resolves #165972.
Resolves #165942.
Resolves #165476.
Resolves #165511.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
  • Loading branch information
davismcphee authored Oct 6, 2023
1 parent 0636610 commit c95721a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export default function ({ getService }: FtrProviderContext) {
.get(defaultPath)
// TODO: API requests in Serverless require internal request headers
.set(svlCommonApi.getInternalRequestHeader());
expect(response6.body[serviceKeyId]).to.be(null);
// TODO: The response comes back undefined in Serverless
const body = response6.body[serviceKeyId];
const expected = body === undefined ? null : body;
expect(expected).to.be(null);
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export default function ({ getService }) {
const es = getService('es');
const esArchiver = getService('esArchiver');

// FLAKY: https://github.com/elastic/kibana/issues/165944
describe.skip('index_patterns/* error handler', () => {
describe('index_patterns/* error handler', () => {
let indexNotFoundError;
let docNotFoundError;
before(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const svlCommonApi = getService('svlCommonApi');

// FLAKY: https://github.com/elastic/kibana/issues/165972
describe.skip('conflicts', () => {
describe('conflicts', () => {
before(() =>
esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/conflicts')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default function ({ getService }: FtrProviderContext) {
const randomness = getService('randomness');
const svlCommonApi = getService('svlCommonApi');

// FLAKY https://github.com/elastic/kibana/issues/165942
describe.skip('params', () => {
describe('params', () => {
before(() =>
esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

// Failing: See https://github.com/elastic/kibana/issues/165476
describe.skip('rollup data views - fields for wildcard', function () {
describe('rollup data views - fields for wildcard', function () {
before(async () => {
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');

// FLAKY: https://github.com/elastic/kibana/issues/165511
describe.skip('scripted fields disabled', function () {
describe('scripted fields disabled', function () {
before(async () => {
// TODO: We're running into a 'Duplicate data view: basic_index'
// error in Serverless, so make sure to clean up first
await kibanaServer.savedObjects.cleanStandardList();
await esArchiver.load('test/api_integration/fixtures/es_archiver/index_patterns/basic_index');
});

Expand Down

0 comments on commit c95721a

Please sign in to comment.