kibana/test/server_integration/http/ssl_with_p12/config.js
Jeramy Soucy 6bfd5a581a
[kbn-scout] update category of server integration tests (#210783)
## Summary

Updates the test category for the server integration test configs from
UI_TEST to UNIT_INTEGRATION_TEST.
2025-02-12 17:23:20 +01:00

53 lines
1.8 KiB
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { readFileSync } from 'fs';
import { CA_CERT_PATH, KBN_P12_PATH, KBN_P12_PASSWORD } from '@kbn/dev-utils';
import { ScoutTestRunConfigCategory } from '@kbn/scout-info';
import { createKibanaSupertestProvider } from '../../services';
export default async function ({ readConfigFile }) {
const httpConfig = await readConfigFile(require.resolve('../../config.base.js'));
const certificateAuthorities = [readFileSync(CA_CERT_PATH)];
return {
testConfigCategory: ScoutTestRunConfigCategory.UNIT_INTEGRATION_TEST,
testFiles: [require.resolve('.')],
services: {
...httpConfig.get('services'),
supertest: createKibanaSupertestProvider({
certificateAuthorities,
}),
},
servers: {
...httpConfig.get('servers'),
kibana: {
...httpConfig.get('servers.kibana'),
protocol: 'https',
certificateAuthorities,
},
},
junit: {
reportName: 'Http SSL Integration Tests',
},
esTestCluster: {
...httpConfig.get('esTestCluster'),
serverArgs: ['xpack.security.enabled=false'],
},
kbnTestServer: {
...httpConfig.get('kbnTestServer'),
serverArgs: [
...httpConfig.get('kbnTestServer.serverArgs'),
'--server.ssl.enabled=true',
`--server.ssl.keystore.path=${KBN_P12_PATH}`,
`--server.ssl.keystore.password=${KBN_P12_PASSWORD}`,
],
},
};
}