Skip to content

Commit e59d7e8

Browse files
committed
move docker servers config to xpack config
1 parent bb5efde commit e59d7e8

2 files changed

Lines changed: 29 additions & 30 deletions

File tree

test/functional/config.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
import { defineDockerServersConfig } from '@kbn/test';
21-
import { first, tap } from 'rxjs/operators';
22-
2320
import { pageObjects } from './page_objects';
2421
import { services } from './services';
2522

@@ -44,30 +41,6 @@ export default async function({ readConfigFile }) {
4441
pageObjects,
4542
services,
4643

47-
dockerServers: defineDockerServersConfig(
48-
process.env.FLEET_PACKAGE_REGISTRY_PORT
49-
? {
50-
helloWorld: {
51-
image: 'docker.elastic.co/package-registry/package-registry:master',
52-
portInContainer: 8080,
53-
port: process.env.FLEET_PACKAGE_REGISTRY_PORT,
54-
waitForLogLine: 'package manifests loaded into memory',
55-
async waitFor(server, logLine$) {
56-
await logLine$
57-
.pipe(
58-
first(line => line.includes('Package registry started')),
59-
tap(line => {
60-
console.log(`waitFor found log line "${line}"`);
61-
console.log('marking server ready', server);
62-
})
63-
)
64-
.toPromise();
65-
},
66-
},
67-
}
68-
: {}
69-
),
70-
7144
servers: commonConfig.get('servers'),
7245

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

x-pack/test/functional/config.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
/* eslint-disable import/no-default-export */
8-
97
import { resolve } from 'path';
108

9+
import { defineDockerServersConfig } from '@kbn/test';
10+
import { first, tap } from 'rxjs/operators';
11+
1112
import { services } from './services';
1213
import { pageObjects } from './page_objects';
1314

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

7071
servers: kibanaFunctionalConfig.get('servers'),
7172

73+
dockerServers: defineDockerServersConfig(
74+
process.env.FLEET_PACKAGE_REGISTRY_PORT
75+
? {
76+
helloWorld: {
77+
image: 'docker.elastic.co/package-registry/package-registry:master',
78+
portInContainer: 8080,
79+
port: process.env.FLEET_PACKAGE_REGISTRY_PORT,
80+
waitForLogLine: 'package manifests loaded into memory',
81+
async waitFor(server, logLine$) {
82+
await logLine$
83+
.pipe(
84+
first(line => line.includes('Package registry started')),
85+
tap(line => {
86+
console.log(`waitFor found log line "${line}"`);
87+
console.log('marking server ready', server);
88+
})
89+
)
90+
.toPromise();
91+
},
92+
},
93+
}
94+
: {}
95+
),
96+
7297
esTestCluster: {
7398
license: 'trial',
7499
from: 'snapshot',
@@ -89,6 +114,8 @@ export default async function({ readConfigFile }) {
89114
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
90115
'--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"',
91116
'--timelion.ui.enabled=true',
117+
`--xpack.ingestManager.enabled=true`,
118+
`--xpack.ingestManager.epm.registryUrl=http://localhost:${process.env.FLEET_PACKAGE_REGISTRY_PORT}`,
92119
],
93120
},
94121
uiSettings: {

0 commit comments

Comments
 (0)