2932b169a2
* integration test for initial installation of package * add all services to integration config * rename files, test removing package * remove import from merge conflict * rename es_assets to all_assets package * move install package to before clause and update test descriptions * fix typo * update ilm policy name * use skipIfNoDockerRegistry helper
30 lines
1 KiB
TypeScript
30 lines
1 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { Context } from 'mocha';
|
|
import { ToolingLog } from '@kbn/dev-utils';
|
|
import { FtrProviderContext } from '../api_integration/ftr_provider_context';
|
|
|
|
export function warnAndSkipTest(mochaContext: Context, log: ToolingLog) {
|
|
log.warning(
|
|
'disabling tests because DockerServers service is not enabled, set INGEST_MANAGEMENT_PACKAGE_REGISTRY_PORT to run them'
|
|
);
|
|
mochaContext.skip();
|
|
}
|
|
|
|
export function skipIfNoDockerRegistry(providerContext: FtrProviderContext) {
|
|
const { getService } = providerContext;
|
|
const dockerServers = getService('dockerServers');
|
|
|
|
const server = dockerServers.get('registry');
|
|
const log = getService('log');
|
|
|
|
beforeEach(function beforeSetupWithDockerRegistry() {
|
|
if (!server.enabled) {
|
|
warnAndSkipTest(this, log);
|
|
}
|
|
});
|
|
}
|