Skip to content

Commit b39ad86

Browse files
Tyler Smalleykibanamachine
andauthored
Use default ES distribution for functional tests (#88737)
Signed-off-by: Tyler Smalley <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
1 parent 46feb76 commit b39ad86

File tree

18 files changed

+44
-33
lines changed

18 files changed

+44
-33
lines changed

.ci/packer_cache_for_branch.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ source src/dev/ci_setup/setup.sh;
2626

2727
# download es snapshots
2828
node scripts/es snapshot --download-only;
29-
node scripts/es snapshot --license=oss --download-only;
3029

3130
# download reporting browsers
3231
(cd "x-pack" && node ../node_modules/.bin/gulp downloadChromium);

packages/kbn-test/src/functional_test_runner/lib/config/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const schema = Joi.object()
169169

170170
esTestCluster: Joi.object()
171171
.keys({
172-
license: Joi.string().default('oss'),
172+
license: Joi.string().default('basic'),
173173
from: Joi.string().default('snapshot'),
174174
serverArgs: Joi.array(),
175175
serverEnvVars: Joi.object(),

packages/kbn-test/src/legacy_es/legacy_es_test_cluster.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function createLegacyEsTestCluster(options = {}) {
2222
const {
2323
port = esTestConfig.getPort(),
2424
password = 'changeme',
25-
license = 'oss',
25+
license = 'basic',
2626
log,
2727
basePath = resolve(KIBANA_ROOT, '.es'),
2828
esFrom = esTestConfig.getBuildFrom(),

src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('migration v2', () => {
3030
adjustTimeout: (t: number) => jest.setTimeout(t),
3131
settings: {
3232
es: {
33-
license: oss ? 'oss' : 'trial',
33+
license: 'trial',
3434
dataArchive,
3535
},
3636
},

src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe.skip('migration from 7.7.2-xpack with 100k objects', () => {
3232
adjustTimeout: (t: number) => jest.setTimeout(600000),
3333
settings: {
3434
es: {
35-
license: oss ? 'oss' : 'trial',
35+
license: 'trial',
3636
dataArchive,
3737
},
3838
},

src/core/test_helpers/kbn_server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export function createTestServers({
185185
adjustTimeout: (timeout: number) => void;
186186
settings?: {
187187
es?: {
188-
license: 'oss' | 'basic' | 'gold' | 'trial';
188+
license: 'basic' | 'gold' | 'trial';
189189
[key: string]: any;
190190
};
191191
kbn?: {
@@ -208,7 +208,7 @@ export function createTestServers({
208208
if (!adjustTimeout) {
209209
throw new Error('adjustTimeout is required in order to avoid flaky tests');
210210
}
211-
const license = get(settings, 'es.license', 'oss');
211+
const license = get(settings, 'es.license', 'basic');
212212
const usersToBeAdded = get(settings, 'users', []);
213213
if (usersToBeAdded.length > 0) {
214214
if (license !== 'trial') {

src/dev/ci_setup/setup.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ yarn kbn bootstrap
3232
###
3333
echo " -- downloading es snapshot"
3434
node scripts/es snapshot --download-only;
35-
node scripts/es snapshot --license=oss --download-only;
36-
3735

3836
###
3937
### verify no git modifications

test/api_integration/config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ export default async function ({ readConfigFile }) {
1919
junit: {
2020
reportName: 'API Integration Tests',
2121
},
22-
esTestCluster: commonConfig.get('esTestCluster'),
22+
esTestCluster: {
23+
...functionalConfig.get('esTestCluster'),
24+
serverArgs: ['xpack.security.enabled=false'],
25+
},
2326
kbnTestServer: {
2427
...functionalConfig.get('kbnTestServer'),
2528
serverArgs: [

test/common/config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ export default function () {
2121
servers,
2222

2323
esTestCluster: {
24-
license: 'oss',
25-
from: 'snapshot',
26-
serverArgs: [],
24+
serverArgs: ['xpack.security.enabled=false'],
2725
},
2826

2927
kbnTestServer: {

test/common/services/deployment.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,7 @@ export function DeploymentProvider({ getService }: FtrProviderContext) {
3535
* Useful for functional testing in cloud environment
3636
*/
3737
async isOss() {
38-
const baseUrl = this.getEsHostPort();
39-
const username = config.get('servers.elasticsearch.username');
40-
const password = config.get('servers.elasticsearch.password');
41-
const response = await fetch(baseUrl + '/_xpack', {
42-
method: 'get',
43-
headers: {
44-
'Content-Type': 'application/json',
45-
Authorization: 'Basic ' + Buffer.from(username + ':' + password).toString('base64'),
46-
},
47-
});
48-
return response.status !== 200;
38+
return config.get('kbnTestServer.serverArgs').indexOf('--oss') > -1;
4939
},
5040

5141
async isCloud(): Promise<boolean> {

0 commit comments

Comments
 (0)