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

[7.x] [SIEM] Bring Cypress tests back to life (#71871) #72140

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

MadameSheema
Copy link
Member

Backports the following commits to 7.x:

* fixes and unskips 'Detection rules, custom'

* fixes 'Export rules' test

* unksips 'Deleting prebuilt rules' test

* unskips Alerts timeline

* unskips 'Events viewer' tests

* unskips 'toggle column in timeline' tests

* unskips 'url timeline' test

* fixes Overview test

* skips flaky test
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts
#	x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts
#	x-pack/plugins/security_solution/cypress/objects/rule.ts
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/data.json.gz
#	x-pack/test/security_solution_cypress/es_archives/custom_rule_with_timeline/mappings.json
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/alerts·ts.alerting api integration security and spaces enabled Alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg creating space
[00:00:00]             │ debg created space
[00:00:00]             │ debg creating space
[00:00:01]             │ debg created space
[00:00:01]             │ debg creating space
[00:00:02]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] [ilm-history-2-000001] creating index, cause [api], templates [ilm-history], shards [1]/[0]
[00:00:02]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] moving index [ilm-history-2-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[ilm-history-2-000001][0]]]).
[00:00:02]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] moving index [ilm-history-2-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:02]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:02]             │ debg created space
[00:00:02]             │ debg creating user no_kibana_privileges
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added user [no_kibana_privileges]
[00:00:02]             │ debg created user no_kibana_privileges
[00:00:02]             │ debg creating role no_kibana_privileges
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added role [no_kibana_privileges]
[00:00:02]             │ debg creating user superuser
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added user [superuser]
[00:00:02]             │ debg created user superuser
[00:00:02]             │ debg creating user global_read
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added user [global_read]
[00:00:02]             │ debg created user global_read
[00:00:02]             │ debg creating role global_read_role
[00:00:02]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added role [global_read_role]
[00:00:02]             │ debg creating user space_1_all
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added user [space_1_all]
[00:00:03]             │ debg created user space_1_all
[00:00:03]             │ debg creating role space_1_all_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] added role [space_1_all_role]
[00:02:54]           └-: Alerts
[00:02:54]             └-> "before all" hook
[00:10:34]             └-: alerts
[00:10:34]               └-> "before all" hook
[00:10:34]               └-> "before all" hook
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] [.kibana-alerting-test-data] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1594927372352427963] [.kibana-test-authorization] creating index, cause [api], templates [], shards [1]/[1]
[00:13:06]               └-: space_1_all at space1
[00:13:06]                 └-> "before all" hook
[00:13:06]                 └-> "before all" hook
[00:13:06]                 └-> should schedule task, run alert and schedule actions when appropriate
[00:13:06]                   └-> "before each" hook: global before each
[00:13:09]                   │ debg --- retry.try error: Expected 1 but received 0.
[00:13:09]                   │ debg --- retry.try failed again with the same message...
[00:13:10]                   │ debg --- retry.try failed again with the same message...
[00:13:10]                   │ proc [kibana]   log   [20:09:48.839] [info][eventLog][plugins] event logged: {"event":{"provider":"alerting","action":"execute","start":"2020-07-16T20:09:48.735Z","end":"2020-07-16T20:09:48.837Z","duration":102000000,"outcome":"success"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"c6740498-143c-47c3-9fae-8ba4f7253a5b","namespace":"space1"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"alert executed: test.always-firing:c6740498-143c-47c3-9fae-8ba4f7253a5b: 'abc'","@timestamp":"2020-07-16T20:09:48.837Z","ecs":{"version":"1.5.0"}}
[00:13:10]                   │ proc [kibana]   log   [20:09:48.840] [info][eventLog][plugins] event logged: {"event":{"provider":"alerting","action":"new-instance"},"kibana":{"alerting":{"instance_id":"1"},"saved_objects":[{"rel":"primary","type":"alert","id":"c6740498-143c-47c3-9fae-8ba4f7253a5b","namespace":"space1"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test.always-firing:c6740498-143c-47c3-9fae-8ba4f7253a5b: 'abc' created new instance: '1'","@timestamp":"2020-07-16T20:09:48.837Z","ecs":{"version":"1.5.0"}}
[00:13:10]                   │ debg --- retry.try failed again with the same message...
[00:13:11]                   │ proc [kibana]   log   [20:09:49.829] [info][eventLog][plugins] event logged: {"event":{"provider":"alerting","action":"execute-action"},"kibana":{"alerting":{"instance_id":"1"},"saved_objects":[{"rel":"primary","type":"alert","id":"c6740498-143c-47c3-9fae-8ba4f7253a5b","namespace":"space1"},{"type":"action","id":"c5e88b12-a619-4ce0-9773-7202bde4a88e","namespace":"space1"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"alert: test.always-firing:c6740498-143c-47c3-9fae-8ba4f7253a5b: 'abc' instanceId: '1' scheduled actionGroup: 'default' action: test.index-record:c5e88b12-a619-4ce0-9773-7202bde4a88e","@timestamp":"2020-07-16T20:09:49.826Z","ecs":{"version":"1.5.0"}}
[00:13:11]                   │ debg --- retry.try failed again with the same message...
[00:13:11]                   │ debg --- retry.try failed again with the same message...
[00:13:12]                   │ debg --- retry.try failed again with the same message...
[00:13:12]                   │ debg --- retry.try failed again with the same message...
[00:13:13]                   │ proc [kibana]   log   [20:09:51.859] [info][eventLog][plugins] event logged: {"event":{"provider":"actions","action":"execute","start":"2020-07-16T20:09:51.712Z","end":"2020-07-16T20:09:51.852Z","duration":140000000,"outcome":"success"},"kibana":{"saved_objects":[{"rel":"primary","type":"action","id":"c5e88b12-a619-4ce0-9773-7202bde4a88e","namespace":"space1"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"action executed: test.index-record:c5e88b12-a619-4ce0-9773-7202bde4a88e: My action","@timestamp":"2020-07-16T20:09:51.852Z","ecs":{"version":"1.5.0"}}
[00:13:13]                   │ debg --- retry.try error: Expected 0 non-idle tasks but received 1
[00:13:13]                   │ debg --- retry.try failed again with the same message...
[00:13:14]                   │ debg --- retry.try failed again with the same message...
[00:13:14]                   │ debg --- retry.try failed again with the same message...
[00:13:17]                   └- ✖ fail: alerting api integration security and spaces enabled Alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate
[00:13:17]                   │      Error: expected 'undefined' to equal 'number'
[00:13:17]                   │       at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
[00:13:17]                   │       at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
[00:13:17]                   │       at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
[00:13:17]                   │       at validateEventLog (test/alerting_api_integration/security_and_spaces/tests/alerting/alerts.ts:973:32)
[00:13:17]                   │ 
[00:13:17]                   │ 

Stack Trace

Error: expected 'undefined' to equal 'number'
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
    at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
    at validateEventLog (test/alerting_api_integration/security_and_spaces/tests/alerting/alerts.ts:973:32)

Build metrics

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@MadameSheema MadameSheema merged commit b11b12c into elastic:7.x Jul 17, 2020
@MadameSheema MadameSheema deleted the backport/7.x/pr-71871 branch July 17, 2020 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants