Skip to content

Commit

Permalink
Change elasticsearch creds for test server
Browse files Browse the repository at this point in the history
Now uses "kibana" user instead of "elastic" user
  • Loading branch information
jportner committed Nov 13, 2019
1 parent 5d1701c commit fbdedff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/test_utils/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,17 @@ export function createTestServers({
// Override provided configs, we know what the elastic user is now
kbnSettings.elasticsearch = {
hosts: [esTestConfig.getUrl()],
username: esTestConfig.getUrlParts().username,
password: esTestConfig.getUrlParts().password,
username: kibanaServerTestUser.username,
password: kibanaServerTestUser.password,
};
}

return {
stop: async () => await es.cleanup(),
es,
hosts: [esTestConfig.getUrl()],
username: esTestConfig.getUrlParts().username,
password: esTestConfig.getUrlParts().password,
username: kibanaServerTestUser.username,
password: kibanaServerTestUser.password,
};
},
startKibana: async () => {
Expand Down
6 changes: 3 additions & 3 deletions test/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import path from 'path';
import { format as formatUrl } from 'url';
import { OPTIMIZE_BUNDLE_DIR, esTestConfig, kbnTestConfig } from '@kbn/test';
import { OPTIMIZE_BUNDLE_DIR, esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
import { services } from './services';

export default function () {
Expand Down Expand Up @@ -53,8 +53,8 @@ export default function () {
'--status.allowAnonymous=true',
'--optimize.enabled=true',
`--elasticsearch.hosts=${formatUrl(servers.elasticsearch)}`,
`--elasticsearch.username=${servers.elasticsearch.username}`,
`--elasticsearch.password=${servers.elasticsearch.password}`,
`--elasticsearch.username=${kibanaServerTestUser.username}`,
`--elasticsearch.password=${kibanaServerTestUser.password}`,
`--kibana.disableWelcomeScreen=true`,
'--telemetry.banner=false',
`--server.maxPayloadBytes=1679958`,
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/reporting/configs/generate_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { esTestConfig, kbnTestConfig } from '@kbn/test';
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
import { format as formatUrl } from 'url';
import { getApiIntegrationConfig } from '../../api_integration/config';
import { getReportingApiConfig } from './api';
Expand Down Expand Up @@ -35,8 +35,8 @@ export default async function ({ readConfigFile }) {
`--server.maxPayloadBytes=1679958`,
`--server.port=${kbnTestConfig.getPort()}`,
`--elasticsearch.hosts=${formatUrl(servers.elasticsearch)}`,
`--elasticsearch.password=${servers.elasticsearch.password}`,
`--elasticsearch.username=${servers.elasticsearch.username}`,
`--elasticsearch.username=${kibanaServerTestUser.username}`,
`--elasticsearch.password=${kibanaServerTestUser.password}`,
`--xpack.reporting.csv.enablePanelActionDownload=true`,
`--xpack.reporting.csv.maxSizeBytes=2850`,
`--xpack.reporting.queue.pollInterval=3000`,
Expand Down

0 comments on commit fbdedff

Please sign in to comment.