Skip to content

Commit

Permalink
[Detections Response][FTR] FTR migration cleanup (#173403)
Browse files Browse the repository at this point in the history
## Summary

Addressing feedback from #172173.

This is not yet addressing file restructure, going to keep the file
restructure in a separate PR to try to make reviews more readable.
  • Loading branch information
yctercero authored Jan 12, 2024
1 parent 0dd4e37 commit a202d3f
Show file tree
Hide file tree
Showing 96 changed files with 444 additions and 308 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function createTestConfig(options: CreateTestConfigOptions, testFiles?: s
servers,
services,
junit: {
reportName: 'X-Pack Detection Engine API Integration Tests',
reportName: 'X-Pack Security Solution API Integration Tests',
},
esTestCluster: {
...xPackApiIntegrationTestsConfig.get('esTestCluster'),
Expand Down
29 changes: 18 additions & 11 deletions x-pack/test/security_solution_api_integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,43 @@
"run-tests:ea:default": "node ./scripts/index.js runner entity_analytics default_license",
"initialize-server:lists:default": "node ./scripts/index.js server lists_and_exception_lists default_license",
"run-tests:lists:default": "node ./scripts/index.js runner lists_and_exception_lists default_license",

"exception_workflows:server:serverless": "npm run initialize-server:dr:default exceptions/workflows serverless",
"exception_workflows:runner:serverless": "npm run run-tests:dr:default exceptions/workflows serverless serverlessEnv",
"exception_workflows:qa:serverless": "npm run run-tests:dr:default exceptions/workflows serverless qaEnv",
"exception_workflows:server:ess": "npm run initialize-server:dr:default exceptions/workflows ess",
"exception_workflows:runner:ess": "npm run run-tests:dr:default exceptions/workflows ess essEnv",

"exception_operators_date_numeric_types:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/date_numeric_types serverless",
"exception_operators_date_numeric_types:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/date_numeric_types serverless serverlessEnv",
"exception_operators_date_numeric_types:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/date_numeric_types serverless qaEnv",
"exception_operators_date_numeric_types:server:ess": "npm run initialize-server:dr:default exceptions/operators_data_types/date_numeric_types ess",
"exception_operators_date_numeric_types:runner:ess": "npm run run-tests:dr:default exceptions/operators_data_types/date_numeric_types ess essEnv",

"exception_operators_keyword:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/keyword serverless",
"exception_operators_keyword:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/keyword serverless serverlessEnv",
"exception_operators_keyword:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/keyword serverless qaEnv",
"exception_operators_keyword:server:ess": "npm run initialize-server:dr:default exceptions/operators_data_types/keyword ess",
"exception_operators_keyword:runner:ess": "npm run run-tests:dr:default exceptions/operators_data_types/keyword ess essEnv",

"exception_operators_ips:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/ips serverless",
"exception_operators_ips:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/ips serverless serverlessEnv",
"exception_operators_ips:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/ips serverless qaEnv",
"exception_operators_ips:server:ess": "npm run initialize-server:dr:default exceptions/operators_data_types/ips ess",
"exception_operators_ips:runner:ess": "npm run run-tests:dr:default exceptions/operators_data_types/ips ess essEnv",

"exception_operators_long:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/long serverless",
"exception_operators_long:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/long serverless serverlessEnv",
"exception_operators_long:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/long serverless qaEnv",
"exception_operators_long:server:ess": "npm run initialize-server:dr:default exceptions/operators_data_types/long ess",
"exception_operators_long:runner:ess": "npm run run-tests:dr:default exceptions/operators_data_types/long ess essEnv",

"exception_operators_text:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/text serverless",
"exception_operators_text:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/text serverless serverlessEnv",
"exception_operators_text:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/text serverless qaEnv",
"exception_operators_text:server:ess": "npm run initialize-server:dr:default exceptions/operators_data_types/text ess",
"exception_operators_text:runner:ess": "npm run run-tests:dr:default exceptions/operators_data_types/text ess essEnv",

"exception_operators_ips_text_array:server:serverless": "npm run initialize-server:dr:default exceptions/operators_data_types/ips_text_array serverless",
"exception_operators_ips_text_array:runner:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/ips_text_array serverless serverlessEnv",
"exception_operators_ips_text_array:qa:serverless": "npm run run-tests:dr:default exceptions/operators_data_types/ips_text_array serverless qaEnv",
Expand All @@ -54,31 +61,37 @@
"actions:qa:serverless": "npm run run-tests:dr:default actions serverless qaEnv",
"actions:server:ess": "npm run initialize-server:dr:default actions ess",
"actions:runner:ess": "npm run run-tests:dr:default actions ess essEnv",

"alerts:server:serverless": "npm run initialize-server:dr:default alerts serverless",
"alerts:runner:serverless": "npm run run-tests:dr:default alerts serverless serverlessEnv",
"alerts:qa:serverless": "npm run run-tests:dr:default alerts serverless qaEnv",
"alerts:server:ess": "npm run initialize-server:dr:default alerts ess",
"alerts:runner:ess": "npm run run-tests:dr:default alerts ess essEnv",

"entity_analytics:server:serverless": "npm run initialize-server:ea:default risk_engine serverless",
"entity_analytics:runner:serverless": "npm run run-tests:ea:default risk_engine serverless serverlessEnv",
"entity_analytics:qa:serverless": "npm run run-tests:ea:default risk_engine serverless qaEnv",
"entity_analytics:server:ess": "npm run initialize-server:ea:default risk_engine ess",
"entity_analytics:runner:ess": "npm run run-tests:ea:default risk_engine ess essEnv",

"prebuilt_rules_management:server:serverless": "npm run initialize-server:dr:default prebuilt_rules/management serverless",
"prebuilt_rules_management:runner:serverless": "npm run run-tests:dr:default prebuilt_rules/management serverless serverlessEnv",
"prebuilt_rules_management:qa:serverless": "npm run run-tests:dr:default prebuilt_rules/management serverless qaEnv",
"prebuilt_rules_management:server:ess": "npm run initialize-server:dr:default prebuilt_rules/management ess",
"prebuilt_rules_management:runner:ess": "npm run run-tests:dr:default prebuilt_rules/management ess essEnv",

"prebuilt_rules_bundled_prebuilt_rules_package:server:serverless": "npm run initialize-server:dr:default prebuilt_rules/bundled_prebuilt_rules_package serverless",
"prebuilt_rules_bundled_prebuilt_rules_package:runner:serverless": "npm run run-tests:dr:default prebuilt_rules/bundled_prebuilt_rules_package serverless serverlessEnv",
"prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless": "npm run run-tests:dr:default prebuilt_rules/bundled_prebuilt_rules_package serverless qaEnv",
"prebuilt_rules_bundled_prebuilt_rules_package:server:ess": "npm run initialize-server:dr:default prebuilt_rules/bundled_prebuilt_rules_package ess",
"prebuilt_rules_bundled_prebuilt_rules_package:runner:ess": "npm run run-tests:dr:default prebuilt_rules/bundled_prebuilt_rules_package ess essEnv",

"prebuilt_rules_large_prebuilt_rules_package:server:serverless": "npm run initialize-server:dr:default prebuilt_rules/large_prebuilt_rules_package serverless",
"prebuilt_rules_large_prebuilt_rules_package:runner:serverless": "npm run run-tests:dr:default prebuilt_rules/large_prebuilt_rules_package serverless serverlessEnv",
"prebuilt_rules_large_prebuilt_rules_package:qa:serverless": "npm run run-tests:dr:default prebuilt_rules/large_prebuilt_rules_package serverless qaEnv",
"prebuilt_rules_large_prebuilt_rules_package:server:ess": "npm run initialize-server:dr:default prebuilt_rules/large_prebuilt_rules_package ess",
"prebuilt_rules_large_prebuilt_rules_package:runner:ess": "npm run run-tests:dr:default prebuilt_rules/large_prebuilt_rules_package ess essEnv",

"prebuilt_rules_update_prebuilt_rules_package:server:serverless": "npm run initialize-server:dr:default prebuilt_rules/update_prebuilt_rules_package serverless",
"prebuilt_rules_update_prebuilt_rules_package:runner:serverless": "npm run run-tests:dr:default prebuilt_rules/update_prebuilt_rules_package serverless serverlessEnv",
"prebuilt_rules_update_prebuilt_rules_package:qa:serverless": "npm run run-tests:dr:default prebuilt_rules/update_prebuilt_rules_package serverless qaEnv",
Expand Down Expand Up @@ -151,17 +164,11 @@
"rule_read:server:ess": "npm run initialize-server:dr:default rule_read ess",
"rule_read:runner:ess": "npm run run-tests:dr:default rule_read ess essEnv",

"detection_engine_basicessentionals:server:serverless": "npm run initialize-server:dr:basicEssentials detection_engine serverless",
"detection_engine_basicessentionals:runner:serverless": "npm run run-tests:dr:basicEssentials detection_engine serverless serverlessEnv",
"detection_engine_basicessentionals:qa:serverless": "npm run run-tests:dr:basicEssentials detection_engine serverless qaEnv",
"detection_engine_basicessentionals:server:ess": "npm run initialize-server:dr:basicEssentials detection_engine ess",
"detection_engine_basicessentionals:runner:ess": "npm run run-tests:dr:basicEssentials detection_engine ess essEnv",

"rule_management_basicessentionals:server:serverless": "npm run initialize-server:dr:basicEssentials rule_management serverless",
"rule_management_basicessentionals:runner:serverless": "npm run run-tests:dr:basicEssentials rule_management serverless serverlessEnv",
"rule_management_basicessentionals:qa:serverless": "npm run run-tests:dr:basicEssentials rule_management serverless qaEnv",
"rule_management_basicessentionals:server:ess": "npm run initialize-server:dr:basicEssentials rule_management ess",
"rule_management_basicessentionals:runner:ess": "npm run run-tests:dr:basicEssentials rule_management ess essEnv",
"detection_engine:essentials:server:serverless": "npm run initialize-server:dr:essentials detection_engine serverless",
"detection_engine:essentials:runner:serverless": "npm run run-tests:dr:essentials detection_engine serverless serverlessEnv",
"detection_engine:essentials:qa:serverless": "npm run run-tests:dr:essentials detection_engine serverless qaEnv",
"detection_engine:basic:server:ess": "npm run initialize-server:dr:basic detection:engine ess",
"detection_engine:basic:runner:ess": "npm run run-tests:dr:basic detection_engine ess essEnv",

"exception_lists_items:server:serverless": "npm run initialize-server:lists:default exception_lists_items serverless",
"exception_lists_items:runner:serverless": "npm run run-tests:lists:default exception_lists_items serverless serverlessEnv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const log = getService('log');
const es = getService('es');
// TODO: add a new service
// TODO: add a new service for loading archiver files similar to "getService('es')"
const config = getService('config');
const isServerless = config.get('serverless');
const dataPathBuilder = new EsArchivePathBuilder(isServerless);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine ESS - Basic Integration Tests',
reportName: 'Detection Engine - Integration Tests - ESS Env - Basic License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { createTestConfig } from '../../../../../config/serverless/config.base.e
export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine Serverless - Essentials Integration Tests',
reportName: 'Detection Engine - Integration Tests - Serverless Env - Essentials License ',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default ({ getService }: FtrProviderContext) => {
const supertest = getService('supertest');
const log = getService('log');
const es = getService('es');
// TODO: add a new service
// TODO: add a new service for loading archiver files similar to "getService('es')"
const config = getService('config');
const ELASTICSEARCH_USERNAME = config.get('servers.kibana.username');
const isServerless = config.get('serverless');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default ({ getService }: FtrProviderContext) => {
const supertest = getService('supertest');
const log = getService('log');
const es = getService('es');
// TODO: add a new service
// TODO: add a new service for loading archiver files similar to "getService('es')"
const config = getService('config');
const ELASTICSEARCH_USERNAME = config.get('servers.kibana.username');
const isServerless = config.get('serverless');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine ESS - Actions API Integration Tests',
reportName: 'Detection Engine - Rule Actions Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { createTestConfig } from '../../../../../config/serverless/config.base';
export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine Serverless - Actions API Integration Tests',
reportName:
'Detection Engine - Rule Actions Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine API Integration Tests - ESS - Alerts',
reportName: 'Detection Engine - Alerts Integration Tests - ESS Env - Trial License',
},
};
}
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: 'Detection Engine API Integration Tests - Serverless - Alerts',
reportName: 'Detection Engine - Alerts Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default ({ getService }: FtrProviderContext) => {
const supertestWithoutAuth = getService('supertestWithoutAuth');
const log = getService('log');
const es = getService('es');
// TODO: add a new service
// TODO: add a new service for loading archiver files similar to "getService('es')"
const config = getService('config');
const isServerless = config.get('serverless');
const dataPathBuilder = new EsArchivePathBuilder(isServerless);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const log = getService('log');
const es = getService('es');
// TODO: add a new service
// TODO: add a new service for loading archiver files similar to "getService('es')"
const config = getService('config');
const isServerless = config.get('serverless');
const dataPathBuilder = new EsArchivePathBuilder(isServerless);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine ESS - Exception Operators Data Types API - Date_numeric_types Integration Tests',
'Detection Engine - Exception Operators Date & Numeric Types Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine Serverless - Exception Operators Data Types API - Date_numeric_types Integration Tests',
'Detection Engine - Exception Operators Date & Numeric Types Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine ESS - Exception Operators Data Types API- IPS Integration Tests',
'Detection Engine - Exception Operators IP Types Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine Serverless - Exception Operators Data Types API- IPS API Integration Tests',
'Detection Engine - Exception Operators IP Types Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine ESS - Exception Operators Data Types API- Keyword Integration Tests',
'Detection Engine - Exception Operators Keyword Types Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine Serverless - Exception Operators Data Types API - Keyword Integration Tests',
'Detection Engine - Exception Operators Keyword Types Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine ESS - Exception Operators Data Types API - Long Integration Tests',
'Detection Engine - Exception Operators Long Types Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine Serverless - Exception Operators Data Types API - Long Integration Tests',
'Detection Engine - Exception Operators Long Types Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine ESS - - Exception Operators Data Types API - Text Integration Tests',
'Detection Engine - Exception Operators Text Types Integration Tests - ESS Env - Trial License',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine Serverless - Exception Operators Data Types API - Text Integration Tests',
'Detection Engine - Exception Operators Text Types Integration Tests - Serverless Env - Complete License',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),
testFiles: [require.resolve('..')],
junit: {
reportName: 'Detection Engine ESS - Exception - Workflows API Integration Tests',
reportName:
'Detection Engine - Exception Workflows Integration Tests - ESS Env - Trial License',
},
};
}
Loading

0 comments on commit a202d3f

Please sign in to comment.