Skip to content

Commit

Permalink
move docker servers config to xpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed May 15, 2020
1 parent bb5efde commit e59d7e8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
28 changes: 0 additions & 28 deletions test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
* under the License.
*/

import { defineDockerServersConfig } from '@kbn/test';
import { first, tap } from 'rxjs/operators';

import { pageObjects } from './page_objects';
import { services } from './services';

Expand All @@ -44,30 +41,6 @@ export default async function({ readConfigFile }) {
pageObjects,
services,

dockerServers: defineDockerServersConfig(
process.env.FLEET_PACKAGE_REGISTRY_PORT
? {
helloWorld: {
image: 'docker.elastic.co/package-registry/package-registry:master',
portInContainer: 8080,
port: process.env.FLEET_PACKAGE_REGISTRY_PORT,
waitForLogLine: 'package manifests loaded into memory',
async waitFor(server, logLine$) {
await logLine$
.pipe(
first(line => line.includes('Package registry started')),
tap(line => {
console.log(`waitFor found log line "${line}"`);
console.log('marking server ready', server);
})
)
.toPromise();
},
},
}
: {}
),

servers: commonConfig.get('servers'),

esTestCluster: commonConfig.get('esTestCluster'),
Expand All @@ -78,7 +51,6 @@ export default async function({ readConfigFile }) {
...commonConfig.get('kbnTestServer.serverArgs'),
'--oss',
'--telemetry.optIn=false',
`--xpack.ingestManager.epm.registryUrl=http://localhost:${process.env.FLEET_PACKAGE_REGISTRY_PORT}`,
],
},

Expand Down
31 changes: 29 additions & 2 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

/* eslint-disable import/no-default-export */

import { resolve } from 'path';

import { defineDockerServersConfig } from '@kbn/test';
import { first, tap } from 'rxjs/operators';

import { services } from './services';
import { pageObjects } from './page_objects';

Expand Down Expand Up @@ -69,6 +70,30 @@ export default async function({ readConfigFile }) {

servers: kibanaFunctionalConfig.get('servers'),

dockerServers: defineDockerServersConfig(
process.env.FLEET_PACKAGE_REGISTRY_PORT
? {
helloWorld: {
image: 'docker.elastic.co/package-registry/package-registry:master',
portInContainer: 8080,
port: process.env.FLEET_PACKAGE_REGISTRY_PORT,
waitForLogLine: 'package manifests loaded into memory',
async waitFor(server, logLine$) {
await logLine$
.pipe(
first(line => line.includes('Package registry started')),
tap(line => {
console.log(`waitFor found log line "${line}"`);
console.log('marking server ready', server);
})
)
.toPromise();
},
},
}
: {}
),

esTestCluster: {
license: 'trial',
from: 'snapshot',
Expand All @@ -89,6 +114,8 @@ export default async function({ readConfigFile }) {
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
'--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"',
'--timelion.ui.enabled=true',
`--xpack.ingestManager.enabled=true`,
`--xpack.ingestManager.epm.registryUrl=http://localhost:${process.env.FLEET_PACKAGE_REGISTRY_PORT}`,
],
},
uiSettings: {
Expand Down

0 comments on commit e59d7e8

Please sign in to comment.