mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ftr] read username from config (#169755)
## Summary Similar to #169639 The tests fail on MKI because username is hardcoded to `elastic_serverless`. Reading value from FTR config should fix it.
This commit is contained in:
parent
0993ce4db9
commit
13d1792544
3 changed files with 8 additions and 6 deletions
|
@ -17,6 +17,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
const retry = getService('retry');
|
||||
const PageObjects = getPageObjects(['common', 'svlCommonPage', 'header']);
|
||||
const reportingAPI = getService('svlReportingApi');
|
||||
const config = getService('config');
|
||||
|
||||
const navigateToReportingManagement = async () => {
|
||||
log.debug(`navigating to reporting management app`);
|
||||
|
@ -47,8 +48,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
],
|
||||
};
|
||||
|
||||
const TEST_USERNAME = 'elastic_serverless';
|
||||
const TEST_PASSWORD = 'changeme';
|
||||
// Kibana CI and MKI use different users
|
||||
const TEST_USERNAME = config.get('servers.kibana.username');
|
||||
const TEST_PASSWORD = config.get('servers.kibana.password');
|
||||
|
||||
before('initialize saved object archive', async () => {
|
||||
// add test saved search object
|
||||
|
|
|
@ -28,7 +28,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const cases = getService('cases');
|
||||
const svlCases = getService('svlCases');
|
||||
const find = getService('find');
|
||||
|
||||
const config = getService('config');
|
||||
const retry = getService('retry');
|
||||
const comboBox = getService('comboBox');
|
||||
const svlCommonNavigation = getPageObject('svlCommonNavigation');
|
||||
|
@ -453,7 +453,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
|
||||
const reporterText = await reporter.getVisibleText();
|
||||
|
||||
expect(reporterText).to.be('elastic_serverless');
|
||||
expect(reporterText).to.be(config.get('servers.kibana.username'));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
const cases = getService('cases');
|
||||
const svlCases = getService('svlCases');
|
||||
const find = getService('find');
|
||||
|
||||
const config = getService('config');
|
||||
const retry = getService('retry');
|
||||
const comboBox = getService('comboBox');
|
||||
const svlCommonNavigation = getPageObject('svlCommonNavigation');
|
||||
|
@ -452,7 +452,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
|
||||
const reporterText = await reporter.getVisibleText();
|
||||
|
||||
expect(reporterText).to.be('elastic_serverless');
|
||||
expect(reporterText).to.be(config.get('servers.kibana.username'));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue