Skip to content

Commit

Permalink
replace mochaOps with suiteTags
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiota committed Jul 9, 2024
1 parent 778fd0c commit d2c5096
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export function createTestConfig(options: CreateTestConfigOptions) {
junit: {
reportName: 'X-Pack Οbservability Solution API Integration Tests',
},
mochaOpts: {
grep: '/^(?!.*@skipInEss).*@ess.*/',
suiteTags: {
include: ['myIncludeEssTag'],
exclude: ['myExcludeEssTag'],
},
kbnTestServer: {
...xPackApiIntegrationTestsConfig.get('kbnTestServer'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export function createTestConfig(options: CreateTestConfigOptions) {
},
testFiles: options.testFiles,
junit: options.junit,
mochaOpts: {
...svlSharedConfig.get('mochaOpts'),
grep: '/^(?!.*@skipInServerless).*@serverless.*/',
suiteTags: {
include: ['myIncludeServerlessTag'],
exclude: ['myExcludeServerlessTag'],
},
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"license": "Elastic License 2.0",
"scripts": {
"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:runner:serverless": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/burn_rate/configs/serverless.config.ts",
"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",
"alerting_burn_rate:runner:ess": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/burn_rate/configs/ess.config.ts",
"alerting_custom_threshold:server:serverless": "node ../../../scripts/functional_tests_server.js --config ./test_suites/alerting/custom_threshold/configs/serverless.config.ts",
"alerting_custom_threshold:runner:serverless": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/custom_threshold/configs/serverless.config.ts --grep @serverless --grep @skipInServerless --invert",
"alerting_custom_threshold:runner:serverless": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/custom_threshold/configs/serverless.config.ts",
"alerting_custom_threshold:server:ess": "node ../../../scripts/functional_tests_server.js --config ./test_suites/alerting/custom_threshold/configs/ess.config.ts",
"alerting_custom_threshold:runner:ess": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/custom_threshold/configs/ess.config.ts --grep @ess --grep @skipInEss --invert"
"alerting_custom_threshold:runner:ess": "node ../../../scripts/functional_test_runner --config=test_suites/alerting/custom_threshold/configs/ess.config.ts"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function ({ getService }: FtrProviderContext) {
const isServerless = config.get('serverless');
const expectedConsumer = isServerless ? 'observability' : 'slo';

describe('@serverless @ess Burn rate rule', () => {
describe('Burn rate rule', () => {
const RULE_TYPE_ID = 'slo.rules.burnRate';
const DATA_VIEW = 'kbn-data-forge-fake_hosts.fake_hosts-*';
const RULE_ALERT_INDEX = '.alerts-observability.slo.alerts-default';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { createTestConfig } from '../../../../config/serverless/config.base';
export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName: 'SLO - Integration Tests - Serverless Env',
reportName: 'SLO - Burn rate Integration Tests - Serverless Env',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Slo - Burn rate rule', function () {
this.tags(['myIncludeServerlessTag', 'myIncludeEssTag']);
loadTestFile(require.resolve('./burn_rate_rule'));
});
}

0 comments on commit d2c5096

Please sign in to comment.