Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline tasks work #15

Closed
wants to merge 97 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
9f0d8e6
WIP small CI test suites
brianseeders Apr 20, 2020
843c562
Remove most of the stuff related to dynamic test plan
brianseeders Apr 20, 2020
c92aaa2
Add a little startup delay back in
brianseeders Apr 21, 2020
383a375
Fix method call
brianseeders Apr 21, 2020
fd847a4
Move intake tasks around
brianseeders Apr 23, 2020
b765b17
Fix siem test command
brianseeders Apr 23, 2020
2978abb
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders Apr 24, 2020
ad3d53f
Add firefox back in
brianseeders Apr 24, 2020
f3adfd3
Squashed commit of the following:
brianseeders Apr 24, 2020
d806ad8
Revert "Squashed commit of the following:"
brianseeders Apr 27, 2020
f2a0c42
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders Apr 27, 2020
25575e9
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 4, 2020
adabc58
Add a bunch of xpack cigroups
brianseeders May 5, 2020
37186fb
Experimenting with docker
brianseeders May 7, 2020
2a5d4b2
Add Dockerfile
brianseeders May 11, 2020
f6404e9
Add .dockerignore
brianseeders May 11, 2020
ddac8ff
wip
brianseeders May 11, 2020
1db3ef9
wip
brianseeders May 11, 2020
ed93595
wip
brianseeders May 11, 2020
8014a77
wip
brianseeders May 12, 2020
ee9d6e8
wip
brianseeders May 12, 2020
66b7592
wip
brianseeders May 12, 2020
9a36075
wip
brianseeders May 12, 2020
2e9025e
wip
brianseeders May 12, 2020
267a156
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 12, 2020
135a0d2
Add more xpack ci groups
brianseeders May 12, 2020
9f8891a
hopefully get things working after static-fs merge
brianseeders May 14, 2020
a717f1d
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 14, 2020
a1676ee
Some fixes
brianseeders May 14, 2020
62a0900
We shouldn't actually need to build the plugins again?
brianseeders May 14, 2020
c46099b
Preverse mtimes, add plugin building back in but reduce workers
brianseeders May 14, 2020
32e1e50
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 14, 2020
e02baa9
Build plugins once at the start
brianseeders May 14, 2020
84219ec
Re-balance ciGroups again, and disable xpack jest for now
brianseeders May 15, 2020
e39d5d1
Fix ciGroup tag
brianseeders May 15, 2020
9102361
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 27, 2020
9e00017
Undo splitting xpack cigroups
brianseeders May 27, 2020
16d5e3f
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 27, 2020
9d896a1
Set maxWorkers for jest to 10
brianseeders May 27, 2020
2d0b0ba
Fix jest
brianseeders May 27, 2020
0789f03
Move TMPDIR so that it's in-memory on in-memory workers
brianseeders May 27, 2020
9a0ee18
A couple of fixes
brianseeders May 28, 2020
5076ece
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders May 28, 2020
378a464
Skip canvas storyshots test for now
brianseeders May 28, 2020
2f29f24
Merge branch 'master' into pipeline-tasks
brianseeders May 29, 2020
8f6bef1
Update table of contents to reflect current content (#66835)
ebeahan May 29, 2020
f7e1dac
Split up a few cigroups
brianseeders May 29, 2020
761465b
clean up kibana-app ownership (#67780)
flash1293 May 29, 2020
1d5933b
Changed AlertsClient to use ActionsClient instead of direct interacti…
YulNaumenko May 29, 2020
6b7b0cb
[Endpoint]EMT: temporarily skip test till package update. (#67778)
nnamdifrankie May 29, 2020
6288096
[kbn/optimizer] use execa to fork workers (#67730)
May 29, 2020
fbb5f31
[APM] Don’t run eslint on cypress snapshots (#67451)
sorenlouv May 29, 2020
81d55f8
[CI] Bump chromedriver and use DETECT_CHROMEDRIVER_VERSION (#67642)
brianseeders May 29, 2020
a63adab
skip flaky suite (#66976)
spalger May 29, 2020
87c34cf
[DOCS] Identifies cloud settings for ML (#67573)
lcawl May 29, 2020
4020188
[kbn/optimizer] update public path before imports (#67561)
May 29, 2020
3c40b97
[DOCS] Link machine learning settings to advanced settings (#67572)
lcawl May 29, 2020
3990287
[Reporting]: Move router + license checks to new platform (#66331)
May 29, 2020
d0aeadf
chore(NA): use env var to point config folder on os_packages built wi…
mistic May 30, 2020
96ef018
[SIEM] Covers 'Import query from saved timeline' functionality with C…
MadameSheema May 30, 2020
6a8b07f
Fix visualize and lens telemetry (#67749)
flash1293 May 30, 2020
96e0e91
[SIEM][Lists] Adds test mocks and README.md to the lists plugin
FrankHassanabad May 31, 2020
6753b1d
Added autocompletion for update by query (#67741)
jloleysens Jun 1, 2020
df4615a
[ILM] Fix fetch policies query (#67827)
alisonelizabeth Jun 1, 2020
773a44d
[Component templates] Server side (#66596)
alisonelizabeth Jun 1, 2020
afbbafb
Fix support for `xpack.spaces.maxSpaces` (#67846)
legrego Jun 1, 2020
53b9542
Deprecate es API exposed from setup contract (#67596)
mshustov Jun 1, 2020
cf2aebf
[Ingest Manager] Optimize installation of integration (#67708)
neptunian Jun 1, 2020
f31330a
[ML] Add ability to delete target index & index pattern when deleting…
qn895 Jun 1, 2020
daf26b9
[ML] Add minor refresh button to DFA and AD Job Messages tabs (#67750)
qn895 Jun 1, 2020
ce47ef5
Updating the licensed feature usage API response format (#67712)
kobelb Jun 1, 2020
be51ca6
[Lens] Allow visualizations to provide a dimension editor (#67560)
Jun 1, 2020
5a6c772
skip flaky suite (#67833)
mistic Jun 1, 2020
cdbcb97
[Uptime] Use date histogram in monitor states (#67558)
shahzad31 Jun 1, 2020
574742e
Limit number of workers during plugin build
brianseeders Jun 1, 2020
279b11b
[SIEM][Exceptions] - Update exceptions hooks to include _find filteri…
yctercero Jun 1, 2020
add5b11
[CI] Fix packer cache node_modules references
brianseeders Jun 1, 2020
b061d85
[Lens] Warn if leaving with unsaved visualization (#67689)
Jun 1, 2020
071f7ef
skip flaky suite (#67821)
mistic Jun 1, 2020
571b3de
[DOCS] Replace docdir attribute with kib-repo-dir (#67907)
lcawl Jun 1, 2020
0dca28b
[SEIM][Detection Engine] Moves the io-ts schemas to the common folder…
FrankHassanabad Jun 1, 2020
78d5026
APM-specific Jest configuration (#67858)
smith Jun 2, 2020
ce45dad
Changed alerting API endpoints urls, bodies and params to follow Kiba…
YulNaumenko Jun 2, 2020
e2ddf8b
[SIEM] Fix draft timeline can be attached to a case (#67844)
patrykkopycinski Jun 2, 2020
8373eb8
Fix bug in tsvb metric add color rules (#67763)
stratoula Jun 2, 2020
7da774f
[Endpoint] add new policy fields (#67323)
kevinlog Jun 2, 2020
7d0ffb5
install default packages in parallel (#67893)
neptunian Jun 2, 2020
a091124
Move application.applications$ to public contract (#67463)
pgayvallet Jun 2, 2020
d550131
[Maps] fix mapbox glyphs error when EMS access is turned off (#67427)
nreese Jun 2, 2020
a1a1d5d
Ensure we query for more than 10 (#67172)
chrisronline Jun 2, 2020
99a83f1
Merge branch 'master' into pipeline-tasks
elasticmachine Jun 2, 2020
52c518a
[SIEM] Fixes column drag and drop in timeline-based views (#67799)
andrew-goldstein Jun 2, 2020
e326614
Don't upload baseline screenshots
brianseeders Jun 2, 2020
7bfc435
Merge branch 'pipeline-tasks' of github.com:brianseeders/kibana into …
brianseeders Jun 2, 2020
c370714
Merge remote-tracking branch 'upstream/master' into pipeline-tasks
brianseeders Jun 2, 2020
f655afb
Cleanup
brianseeders Jun 2, 2020
800b875
Move plugin build copy-pastas to separate files
brianseeders Jun 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[SIEM] Covers 'Import query from saved timeline' functionality with C…
…ypress (elastic#67459)

* modifies 'Creates and activates a new custom rule' test to cover 'import query from saved timeline' functionality

* adds missing files

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
MadameSheema and elasticmachine authored May 30, 2020
commit 96ef01828ce0a0083dad4ad4aa104feea9e6d60c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
import {
createAndActivateRule,
fillAboutRuleAndContinue,
fillDefineCustomRuleAndContinue,
fillDefineCustomRuleWithImportedQueryAndContinue,
} from '../tasks/create_new_rule';
import {
goToManageSignalDetectionRules,
Expand All @@ -66,11 +66,11 @@ import { DETECTIONS } from '../urls/navigation';

describe('Signal detection rules, custom', () => {
before(() => {
esArchiverLoad('prebuilt_rules_loaded');
esArchiverLoad('custom_rule_with_timeline');
});

after(() => {
esArchiverUnload('prebuilt_rules_loaded');
esArchiverUnload('custom_rule_with_timeline');
});

it('Creates and activates a new custom rule', () => {
Expand All @@ -80,7 +80,7 @@ describe('Signal detection rules, custom', () => {
goToManageSignalDetectionRules();
waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded();
goToCreateNewRule();
fillDefineCustomRuleAndContinue(newRule);
fillDefineCustomRuleWithImportedQueryAndContinue(newRule);
fillAboutRuleAndContinue(newRule);
createAndActivateRule();

Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/siem/cypress/objects/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface CustomRule {
falsePositivesExamples: string[];
mitre: Mitre[];
note: string;
timelineId: string;
}

export interface MachineLearningRule {
Expand Down Expand Up @@ -56,7 +57,7 @@ const mitre2: Mitre = {
};

export const newRule: CustomRule = {
customQuery: 'hosts.name: *',
customQuery: 'host.name: *',
name: 'New Rule Test',
description: 'The new rule description.',
severity: 'High',
Expand All @@ -66,6 +67,7 @@ export const newRule: CustomRule = {
falsePositivesExamples: ['False1', 'False2'],
mitre: [mitre1, mitre2],
note: '# test markdown',
timelineId: '352c6110-9ffb-11ea-b3d8-857d6042d9bd',
};

export const machineLearningRule: MachineLearningRule = {
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/siem/cypress/screens/create_new_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const CUSTOM_QUERY_INPUT = '[data-test-subj="queryInput"]';

export const DEFINE_CONTINUE_BUTTON = '[data-test-subj="define-continue"]';

export const IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK =
'[data-test-subj="importQueryFromSavedTimeline"]';

export const INVESTIGATION_NOTES_TEXTAREA =
'[data-test-subj="detectionEngineStepAboutRuleNote"] textarea';

Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/siem/cypress/screens/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const SEARCH_OR_FILTER_CONTAINER =

export const SERVER_SIDE_EVENT_COUNT = '[data-test-subj="server-side-event-count"]';

export const TIMELINE = (id: string) => {
return `[data-test-subj="title-${id}"]`;
};

export const TIMELINE_DATA_PROVIDERS = '[data-test-subj="dataProviders"]';

export const TIMELINE_DATA_PROVIDERS_EMPTY =
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/siem/cypress/tasks/create_new_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CUSTOM_QUERY_INPUT,
DEFINE_CONTINUE_BUTTON,
FALSE_POSITIVES_INPUT,
IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK,
INVESTIGATION_NOTES_TEXTAREA,
MACHINE_LEARNING_DROPDOWN,
MACHINE_LEARNING_LIST,
Expand All @@ -30,6 +31,7 @@ import {
SEVERITY_DROPDOWN,
TAGS_INPUT,
} from '../screens/create_new_rule';
import { TIMELINE } from '../screens/timeline';

export const createAndActivateRule = () => {
cy.get(SCHEDULE_CONTINUE_BUTTON).click({ force: true });
Expand Down Expand Up @@ -86,6 +88,15 @@ export const fillDefineCustomRuleAndContinue = (rule: CustomRule) => {
cy.get(CUSTOM_QUERY_INPUT).should('not.exist');
};

export const fillDefineCustomRuleWithImportedQueryAndContinue = (rule: CustomRule) => {
cy.get(IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK).click();
cy.get(TIMELINE(rule.timelineId)).click();
cy.get(CUSTOM_QUERY_INPUT).should('have.attr', 'value', rule.customQuery);
cy.get(DEFINE_CONTINUE_BUTTON).should('exist').click({ force: true });

cy.get(CUSTOM_QUERY_INPUT).should('not.exist');
};

export const fillDefineMachineLearningRuleAndContinue = (rule: MachineLearningRule) => {
cy.get(MACHINE_LEARNING_DROPDOWN).click({ force: true });
cy.contains(MACHINE_LEARNING_LIST, rule.machineLearningJob).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ const StepDefineRuleComponent: FC<StepDefineRuleProps> = ({
config={{
...schema.queryBar,
labelAppend: (
<MyLabelButton onClick={handleOpenTimelineSearch}>
<MyLabelButton
data-test-subj="importQueryFromSavedTimeline"
onClick={handleOpenTimelineSearch}
>
{i18n.IMPORT_TIMELINE_QUERY}
</MyLabelButton>
),
Expand Down
Binary file not shown.
Loading