mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[Test] Unskip serverless ES jest integration smoke
test (#165316)
## Summary Unskip the `smoke` test we added for serverless jest integration and update the root utilities.
This commit is contained in:
parent
7ce2cb3fcf
commit
bc9b6f8b16
4 changed files with 14 additions and 9 deletions
|
@ -8,5 +8,9 @@ is_test_execution_step
|
|||
|
||||
.buildkite/scripts/bootstrap.sh
|
||||
|
||||
echo '--- Docker login'
|
||||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
|
||||
trap 'docker logout docker.elastic.co' EXIT
|
||||
|
||||
echo '--- Jest Integration Tests'
|
||||
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import Path from 'path';
|
||||
import { defaultsDeep } from 'lodash';
|
||||
import { Client, HttpConnection } from '@elastic/elasticsearch';
|
||||
import { Cluster } from '@kbn/es';
|
||||
import Path from 'path';
|
||||
import { REPO_ROOT } from '@kbn/repo-info';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
import execa from 'execa';
|
||||
import { CliArgs } from '@kbn/config';
|
||||
import { createRoot, type TestElasticsearchUtils, type TestKibanaUtils } from './create_root';
|
||||
|
||||
|
@ -64,6 +63,7 @@ export function createTestServerlessInstances({
|
|||
};
|
||||
}
|
||||
|
||||
const ES_BASE_PATH_DIR = Path.join(REPO_ROOT, '.es/es_test_serverless');
|
||||
function createServerlessES() {
|
||||
const log = new ToolingLog({
|
||||
level: 'info',
|
||||
|
@ -74,15 +74,17 @@ function createServerlessES() {
|
|||
es,
|
||||
start: async () => {
|
||||
await es.runServerless({
|
||||
basePath: Path.join(REPO_ROOT, '.es/es_test_serverless'),
|
||||
basePath: ES_BASE_PATH_DIR,
|
||||
teardown: true,
|
||||
background: true,
|
||||
clean: true,
|
||||
});
|
||||
// runServerless doesn't wait until the nodes are up
|
||||
await waitUntilClusterReady(getServerlessESClient());
|
||||
return {
|
||||
getClient: getServerlessESClient,
|
||||
stop: async () => {
|
||||
// hack to stop the ES cluster
|
||||
await execa('docker', ['container', 'stop', 'es01', 'es02', 'es03']);
|
||||
await es.stop();
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
@ -579,6 +579,8 @@ exports.Cluster = class Cluster {
|
|||
* @param {ServerlessOptions} options
|
||||
*/
|
||||
async runServerless(options = {}) {
|
||||
// Ensure serverless ES nodes are not running
|
||||
teardownServerlessClusterSync(this._log, options);
|
||||
if (this._process || this._outcome) {
|
||||
throw new Error('ES has already been started');
|
||||
}
|
||||
|
|
|
@ -13,10 +13,7 @@ import {
|
|||
createTestServerlessInstances,
|
||||
} from '@kbn/core-test-helpers-kbn-server';
|
||||
|
||||
/**
|
||||
* Until we merge https://github.com/elastic/kibana/pull/162673 this test should remain skipped.
|
||||
*/
|
||||
describe.skip('smoke', () => {
|
||||
describe('smoke', () => {
|
||||
let serverlessES: TestServerlessESUtils;
|
||||
let serverlessKibana: TestServerlessKibanaUtils;
|
||||
let root: TestServerlessKibanaUtils['root'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue