Skip to content

Commit

Permalink
restructure and add a how to run section in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiota committed May 13, 2024
1 parent ddb3621 commit 8c0c86e
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,5 +566,5 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/investigation/timeline/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/sources/indices/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/sources/indices/trial_license_complete_tier/configs/serverless.config.ts
- x-pack/test/observability_solution_api_integration/test_suites/slo/configs/serverless.config.ts
- x-pack/test/observability_solution_api_integration/test_suites/slo/configs/ess.config.ts
- x-pack/test/observability_solution_api_integration/test_suites/alerting/burn_rate/configs/serverless.config.ts
- x-pack/test/observability_solution_api_integration/test_suites/alerting/burn_rate/configs/ess.config.ts
32 changes: 32 additions & 0 deletions x-pack/test/observability_solution_api_integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,35 @@ ex:

In the `package.json` file, you'll find commands to configure the server for each environment and to run tests against that specific environment. These commands adhere to the Mocha tagging system, allowing for the inclusion and exclusion of tags, mirroring the setup of the CI pipeline.

# How to run
You can run various commands with different parameters for the different test worflows.

The command structure follows this pattern:

- `<test>`: The test workflow you want to run.
- `<type>`: The type of operation, either "server" or "runner."
- `<environment>`: The testing environment, such as "serverless," or "ess", specifies the correct configuration file for the tests.

Run the server for "alerting_burn_rate" in the "serverless" environment:

```shell
npm run alerting_burn_rate:server:serverless
```

Run tests for "alerting_burn_rate" in the "serverless" environment:

```shell
npm run alerting_burn_rate:runner:serverless
```

Run the server for "alerting_burn_rate" in the "ess" environment:

```shell
npm run alerting_burn_rate:server:ess
```

Run tests for "alerting_burn_rate" in the "ess" environment:

```shell
npm run alerting_burn_rate:runner:ess
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"private": true,
"license": "Elastic License 2.0",
"scripts": {
"slo:server:serverless": "node ../../../scripts/functional_tests_server.js --config ./test_suites/slo/configs/serverless.config.ts",
"slo:runner:serverless": "node ../../../scripts/functional_test_runner --config=test_suites/slo/configs/serverless.config.ts --grep @serverless --grep @skipInServerless --invert",
"slo:server:ess": "node ../../../scripts/functional_tests_server.js --config ./test_suites/slo/configs/ess.config.ts",
"slo:runner:ess": "node ../../../scripts/functional_test_runner --config=test_suites/slo/configs/ess.config.ts --grep @ess --grep @skipInEss --invert"
"alerting_burn_rate:server:serverless": "node ../../../scripts/functional_tests_server.js --config ./test_suites/alerting/burn_rate/configs/serverless.config.ts",
"alerting_burn_rate:runner:serverless": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/burn_rate/configs/serverless.config.ts --grep @serverless --grep @skipInServerless --invert",
"alerting_burn_rate:server:ess": "node ../../../scripts/functional_tests_server.js --config ./test_suites/alerting/burn_rate/configs/ess.config.ts",
"alerting_burn_rate:runner:ess": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/burn_rate/configs/ess.config.ts --grep @ess --grep @skipInEss --invert"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { cleanup, Dataset, generate, PartialConfig } from '@kbn/data-forge';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getService }: FtrProviderContext) {
const esClient = getService('es');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* 2.0.
*/

import { createTestConfig } from '../../../config/ess/config.base';
import { AlertingApiProvider } from '../../../services/alerting_api';
import { SloApiProvider } from '../../../services/slo_api';
import { createTestConfig } from '../../../../config/ess/config.base';
import { AlertingApiProvider } from '../../../../services/alerting_api';
import { SloApiProvider } from '../../../../services/slo_api';

export default createTestConfig({
services: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* 2.0.
*/

import { createTestConfig } from '../../../config/serverless/config.base';
import { AlertingApiProvider } from '../../../services/alerting_api';
import { SloApiProvider } from '../../../services/slo_api';
import { createTestConfig } from '../../../../config/serverless/config.base';
import { AlertingApiProvider } from '../../../../services/alerting_api';
import { SloApiProvider } from '../../../../services/slo_api';

export default createTestConfig({
services: {
Expand Down

0 comments on commit 8c0c86e

Please sign in to comment.