-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Søren Louv-Jansen <[email protected]>
- Loading branch information
1 parent
ba7f7c4
commit 646bf77
Showing
11 changed files
with
103 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
import cypress from 'cypress'; | ||
import { FtrProviderContext } from './ftr_provider_context'; | ||
import { cypressStart } from './cypress_start'; | ||
|
||
async function ftrConfigOpen({ readConfigFile }: FtrConfigProviderContext) { | ||
const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts')); | ||
return { | ||
...kibanaConfig.getAll(), | ||
testRunner, | ||
}; | ||
} | ||
|
||
export async function testRunner({ getService }: FtrProviderContext) { | ||
await cypressStart(getService, cypress.open); | ||
} | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default ftrConfigOpen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
import cypress from 'cypress'; | ||
import { cypressStart } from './cypress_start'; | ||
import { FtrProviderContext } from './ftr_provider_context'; | ||
|
||
async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) { | ||
const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts')); | ||
return { | ||
...kibanaConfig.getAll(), | ||
testRunner, | ||
}; | ||
} | ||
|
||
async function testRunner({ getService }: FtrProviderContext) { | ||
const result = await cypressStart(getService, cypress.run); | ||
|
||
if (result && (result.status === 'failed' || result.totalFailed > 0)) { | ||
throw new Error(`APM Cypress tests failed`); | ||
} | ||
} | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default ftrConfigRun; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters