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

[ML] Categorization field example endpoint tests #57471

Merged

Conversation

jgowdyelastic
Copy link
Member

Adds api tests for the categorization example endpoint.

@jgowdyelastic jgowdyelastic self-assigned this Feb 12, 2020
@jgowdyelastic jgowdyelastic added :ml non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0 labels Feb 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@jgowdyelastic jgowdyelastic marked this pull request as ready for review February 12, 2020 17:29
@jgowdyelastic jgowdyelastic changed the title [ML] Categorization example endpoint tests [ML] Categorization field example endpoint tests Feb 12, 2020
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security·ts.Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings; redirects to management home

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 4 times on tracked branches: https://github.com/elastic/kibana/issues/57377

[00:00:00]       │
[00:00:00]         └-: Advanced Settings
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: security feature controls
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> "before all" hook
[00:00:00]               │ info [empty_kibana] Loading "mappings.json"
[00:00:00]               │ info [empty_kibana] Loading "data.json.gz"
[00:00:00]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_1/PmuGUbcCRIWCUcKFiOgitw] deleting index
[00:00:00]               │ info [empty_kibana] Deleted existing index [".kibana_1"]
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]               │ info [empty_kibana] Created index ".kibana"
[00:00:00]               │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:00]               │ info [empty_kibana] Indexed 2 docs into ".kibana"
[00:00:44]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana/vXges01qQlCAv2PqS6TmxA] update_mapping [_doc]
[00:00:47]               │ info Creating index .kibana_2.
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:47]               │ info Reindexing .kibana to .kibana_1
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] updating number_of_replicas to [0] for indices [.tasks]
[00:00:47]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] 807 finished with response BulkByScrollResponse[took=88.3ms,timed_out=false,sliceId=null,updated=0,created=4,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:47]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana/vXges01qQlCAv2PqS6TmxA] deleting index
[00:00:47]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:00:47]               │ debg Migrating saved objects config:6.0.0-alpha1, space:default, maps-telemetry:maps-telemetry, config:8.0.0-SNAPSHOT
[00:00:47]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_2/4SqzGyQvQ8GcllTlyyYpoA] update_mapping [_doc]
[00:00:48]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_2/4SqzGyQvQ8GcllTlyyYpoA] update_mapping [_doc]
[00:00:48]               │ info Pointing alias .kibana to .kibana_2.
[00:00:48]               │ info Finished in 1069ms.
[00:00:48]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:48]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] [.kibana_2/4SqzGyQvQ8GcllTlyyYpoA] update_mapping [_doc]
[00:02:28]             └-: no advanced_settings privileges
[00:02:28]               └-> "before all" hook
[00:02:28]               └-> "before all" hook
[00:02:28]                 │ debg creating role no_advanced_settings_privileges_role
[00:02:28]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] added role [no_advanced_settings_privileges_role]
[00:02:28]                 │ debg created role no_advanced_settings_privileges_role
[00:02:28]                 │ debg creating user no_advanced_settings_privileges_user
[00:02:29]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-oraclelinux-tests-xl-1581591803432606519] added user [no_advanced_settings_privileges_user]
[00:02:29]                 │ debg created user no_advanced_settings_privileges_user
[00:02:29]                 │ debg navigating to login url: http://localhost:6131/login
[00:02:29]                 │ debg Navigate to: http://localhost:6131/login
[00:02:29]                 │ proc [kibana]   log   [11:36:27.184] [info][authentication][plugins][security] Authentication attempt failed: [security_exception] unable to authenticate user [global_advanced_settings_read_user] for REST request [/_security/_authenticate], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }
[00:02:29]                 │ debg ... sleep(700) start
[00:02:29]                 │ERROR browser[SEVERE] http://localhost:6131/ - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:02:29]                 │ debg ... sleep(700) end
[00:02:29]                 │ debg returned from get, calling refresh
[00:02:30]                 │ debg browser[INFO] http://localhost:6131/login?next=%2F 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:30]                 │
[00:02:30]                 │ debg browser[INFO] http://localhost:6131/bundles/app/login/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:30]                 │ debg currentUrl = http://localhost:6131/login?next=%2F
[00:02:30]                 │          appUrl = http://localhost:6131/login
[00:02:30]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:35]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_1.bundle.dll.js 103:139970 "INFO: 2020-02-13T11:36:32Z
[00:02:35]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:35]                 │
[00:02:35]                 │      "
[00:02:35]                 │ debg ... sleep(501) start
[00:02:35]                 │ debg ... sleep(501) end
[00:02:35]                 │ debg in navigateTo url = http://localhost:6131/login?next=%2F#/
[00:02:35]                 │ debg TestSubjects.exists(statusPageContainer)
[00:02:35]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:38]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:38]                 │ debg TestSubjects.setValue(loginUsername, no_advanced_settings_privileges_user)
[00:02:38]                 │ debg TestSubjects.click(loginUsername)
[00:02:38]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:02:38]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:02:39]                 │ debg TestSubjects.setValue(loginPassword, no_advanced_settings_privileges_user-password)
[00:02:39]                 │ debg TestSubjects.click(loginPassword)
[00:02:39]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:02:39]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:02:39]                 │ debg TestSubjects.click(loginSubmit)
[00:02:39]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:02:39]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:02:39]                 │ debg Waiting up to 20000ms for logout button visible...
[00:02:39]                 │ debg TestSubjects.exists(userMenuButton)
[00:02:39]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:02:42]                 │ debg browser[INFO] http://localhost:6131/app/kibana#/ 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:42]                 │
[00:02:42]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:42]                 │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:02:43]                 │ debg TestSubjects.exists(userMenuButton)
[00:02:43]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:02:45]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_1.bundle.dll.js 103:139970 "INFO: 2020-02-13T11:36:41Z
[00:02:45]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:45]                 │
[00:02:45]                 │      "
[00:02:46]                 │ debg TestSubjects.exists(userMenu)
[00:02:46]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:02:48]                 │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:02:49]                 │ debg TestSubjects.click(userMenuButton)
[00:02:49]                 │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:02:49]                 │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:02:49]                 │ debg Waiting up to 20000ms for user menu opened...
[00:02:49]                 │ debg TestSubjects.exists(userMenu)
[00:02:49]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:02:49]                 │ debg TestSubjects.exists(userMenu > logoutLink)
[00:02:49]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:02:49]               └-> shows Management navlink
[00:02:49]                 └-> "before each" hook: global before each
[00:02:49]                 │ debg TestSubjects.find(navDrawer)
[00:02:49]                 │ debg Find.findByCssSelector('[data-test-subj="navDrawer"]') with timeout=10000
[00:02:49]                 └- ✓ pass  (32ms) "Advanced Settings security feature controls no advanced_settings privileges shows Management navlink"
[00:02:49]               └-> does not allow navigation to advanced settings; redirects to management home
[00:02:49]                 └-> "before each" hook: global before each
[00:02:49]                 │ debg navigateToActualUrl http://localhost:6131/app/kibana#management/kibana/settings
[00:02:49]                 │ debg browser[INFO] http://localhost:6131/app/kibana?_t=1581593807306#management/kibana/settings 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:49]                 │
[00:02:49]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:49]                 │ debg TestSubjects.exists(managementHome)
[00:02:49]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="managementHome"]') with timeout=10000
[00:02:52]                 │ debg --- retry.tryForTime error: [data-test-subj="managementHome"] is not displayed
[00:02:56]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_1.bundle.dll.js 103:139970 "INFO: 2020-02-13T11:36:52Z
[00:02:56]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:56]                 │
[00:02:56]                 │      "
[00:02:56]                 │ debg browser[INFO] http://localhost:6131/app/kibana#/management 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:56]                 │
[00:02:56]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:56]                 │ debg --- retry.tryForTime failed again with the same message...
[00:02:59]                 │ debg --- retry.tryForTime failed again with the same message...
[00:03:00]                 │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings_ redirects to management home.png"
[00:03:02]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_1.bundle.dll.js 103:139970 "INFO: 2020-02-13T11:36:58Z
[00:03:02]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:03:02]                 │
[00:03:02]                 │      "
[00:03:02]                 │ info Current URL is: http://localhost:6131/app/kibana#/management?_g=()
[00:03:02]                 │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings_ redirects to management home.html
[00:03:02]                 └- ✖ fail: "Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings; redirects to management home"
[00:03:02]                 │

Stack Trace

Error: expected testSubject(managementHome) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/kibana/test/functional/services/test_subjects.ts:60:15)

History

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

@jgowdyelastic jgowdyelastic merged commit 02319b7 into elastic:master Feb 13, 2020
@jgowdyelastic jgowdyelastic deleted the categorization-endpoint-tests branch February 13, 2020 13:11
jgowdyelastic added a commit to jgowdyelastic/kibana that referenced this pull request Feb 13, 2020
* [ML] Categorization example endpoint tests

* adding data

* removing debug code

* adding endpoint error test

* updating version in archive
jgowdyelastic added a commit that referenced this pull request Feb 13, 2020
* [ML] Categorization example endpoint tests

* adding data

* removing debug code

* adding endpoint error test

* updating version in archive
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 13, 2020
* master: (22 commits)
  Use log4j pattern syntax (elastic#57433)
  [ML] Categorization field example endpoint tests (elastic#57471)
  [Lens] Filter out pinned filters from saved object of Lens (elastic#57197)
  Lens client side shim cleanup (elastic#56976)
  [Maps] do not show border color for icon in legend when border width is zero (elastic#57501)
  refactors 'data-providers' tests (elastic#57474)
  add `absolute` option to `getUrlForApp` (elastic#57193)
  [Telemetry] Migrate public to NP (elastic#56285)
  address flaky test where instances might have different start… (elastic#57506)
  fix(NA): support legacy plugins path in plugins (elastic#57472)
  build immutable bundles for new platform plugins (elastic#53976)
  [SIEM] [Detection Engine] Reject if duplicate rule_id in request payload (elastic#57057)
  Add autocomplete="off" for input type="password" to appease the scanners (elastic#56922)
  Use default spaces suffix for signals index if spaces disabled (elastic#57244)
  [Alerting] Create alert design cleanup (elastic#56929)
  Management Api - add to migration guide (elastic#56892)
  fixing maps (elastic#56706)
  [Maps] Autocomplete for custom color palettes and custom icon palettes (elastic#56446)
  [Alerting] make actionGroup name's i18n-able (elastic#57404)
  fixed flaky test (elastic#57490)
  ...

# Conflicts:
#	src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap
#	src/plugins/telemetry/public/components/telemetry_management_section.tsx
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 13, 2020
* master: (22 commits)
  skip flaky suite (elastic#50018)
  skip settings tests (elastic#57608)
  skip failing suite (elastic#44631)
  [SIEM] [Case] Initial UI (elastic#57283)
  handle viewing sample dashboards on default dist (elastic#57510)
  Fix detection of "system requests" in plugins (elastic#57149)
  [ML] New Platform server shim: update job service schema (elastic#57614)
  skip flaky suite (elastic#44631)
  [APM] Update monospace font family variable (elastic#57555)
  skip flaky test (elastic#57377)
  Skip save query tests (elastic#57589)
  [Maps] allow simultaneous opening of multiple tooltips (elastic#57226)
  [Uptime] Fix/host connected components (elastic#56969)
  [logs][metrics][docs] Update screenshots for 7.6 (elastic#57254)
  [ML] New Platform server shim: update job service routes to use new platform router (elastic#57403)
  [Maps] Fix document source top hits split by scripted field (elastic#57481)
  Use log4j pattern syntax (elastic#57433)
  [ML] Categorization field example endpoint tests (elastic#57471)
  [Lens] Filter out pinned filters from saved object of Lens (elastic#57197)
  Lens client side shim cleanup (elastic#56976)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants