Skip to content

Commit fa0e8b7

Browse files
author
Lee Drengenberg
authored
[7.10] define integrationTestRoot in config file and use to define screensho… (#79247) (#81900)
1 parent aa46740 commit fa0e8b7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

x-pack/test/stack_functional_integration/apps/metricbeat/_metricbeat_dashboard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import expect from '@kbn/expect';
8-
import { REPO_ROOT } from '@kbn/dev-utils';
98

109
export default function ({ getService, getPageObjects, updateBaselines }) {
1110
const screenshot = getService('screenshots');
@@ -15,7 +14,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
1514

1615
describe('check metricbeat Dashboard', function () {
1716
before(async function () {
18-
await esArchiver.load(`${REPO_ROOT}/../integration-test/test/es_archives/metricbeat`);
17+
await esArchiver.load('metricbeat');
1918

2019
// this navigateToActualURL takes the place of navigating to the dashboard landing page,
2120
// filtering on the dashboard name, selecting it, setting the timepicker, and going to full screen

x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ const log = new ToolingLog({
1616
level: 'info',
1717
writeTo: process.stdout,
1818
});
19+
log.info(`REPO_ROOT = ${REPO_ROOT}`);
1920
log.info(`WORKSPACE in config file ${process.env.WORKSPACE}`);
20-
const stateFilePath = process.env.WORKSPACE
21-
? `${process.env.WORKSPACE}/qa/envvars.sh`
22-
: `${REPO_ROOT}/../integration-test/qa/envvars.sh`;
21+
22+
const INTEGRATION_TEST_ROOT = process.env.WORKSPACE || resolve(REPO_ROOT, '../integration-test');
23+
log.info(`INTEGRATION_TEST_ROOT = ${INTEGRATION_TEST_ROOT}`);
24+
25+
const stateFilePath = resolve(INTEGRATION_TEST_ROOT, 'qa/envvars.sh');
26+
log.info(`stateFilePath = ${stateFilePath}`);
2327

2428
const prepend = (testFile) => require.resolve(`${testsFolder}/${testFile}`);
2529

@@ -46,11 +50,11 @@ export default async ({ readConfigFile }) => {
4650
security: { disableTestUser: true },
4751
// choose where screenshots should be saved
4852
screenshots: {
49-
directory: resolve(`${REPO_ROOT}/../integration-test`, 'test/screenshots'),
53+
directory: resolve(INTEGRATION_TEST_ROOT, 'test/screenshots'),
5054
},
5155
// choose where esArchiver should load archives from
5256
esArchiver: {
53-
directory: resolve(`${REPO_ROOT}/../integration-test`, 'test/es_archives'),
57+
directory: resolve(INTEGRATION_TEST_ROOT, 'test/es_archives'),
5458
},
5559
};
5660
return settings;

0 commit comments

Comments
 (0)