[Uptime] Add API functional tests for uptime graphQL#29128
[Uptime] Add API functional tests for uptime graphQL#29128justinkambic merged 17 commits intoelastic:6.xfrom
Conversation
|
Pinging @elastic/uptime |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
andrewvc
left a comment
There was a problem hiding this comment.
Shockingly for such a big delta. LGTM from me with no comments. Great work
LeeDr
left a comment
There was a problem hiding this comment.
I don't see the test results in the Jenkins job, but maybe I'm looking in the wrong place.
I think you need to add tests to test/api_integration/apis/index.js
| const supertest = getService('supertest'); | ||
| const esArchiver = getService('esArchiver'); | ||
| const archive = 'uptime/full_heartbeat'; | ||
| before('load heartbeat data', () => esArchiver.load(archive)); |
There was a problem hiding this comment.
If all the tests in the index.js are loading the same data (it looks like they're all loading uptime/full_heartbeat) you could just put the before and after in the index.js file so it loads the data once before the first test and unloads it after the last test.
We do have the uptime directory imported in that file, and the index of our directory imports both GQL and REST API tests. I'll let you know if I don't see it on the latest CI run. |
|
jenkins test this |
💔 Build Failed |
💚 Build Succeeded |
|
@LeeDr you can see the tests run in the latest CI job here: https://kibana-ci.elastic.co/job/elastic+kibana+pull-request/8917/JOB=x-pack-ciGroup5,node=immutable/testReport/X-Pack%20API%20Integration%20Tests/ |
|
LGTM |
💚 Build Succeeded |
* Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Address PR feedback with filter typing to clean up code. * Add comments based on PR feedback. * Fix bug introduced in 8856be8.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Create functional UI tests for Overview and Monitor pages. * Add additional waits to functional UI test to try to prevent flakiness. * [ftr/services/superDatePicker] make specialized service * Add data-test-subj value to monitor link. * Remove wait calls from UI tests. * Set default timezone for tests' kibana server. * Add @types for mocha and expect.js. * Implement PR feedback. * Remove added types. * Re-add mocha types. * Remove obsolete comment. * Disable timestamp on uptime app navigation for functional tests. * Undo previous change for default value of function parameter. * Add redirect hack to uptime client to change window location when expected router path is not satisfied.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (elastic#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Create functional UI tests for Overview and Monitor pages. * Add additional waits to functional UI test to try to prevent flakiness. * [ftr/services/superDatePicker] make specialized service * Add data-test-subj value to monitor link. * Remove wait calls from UI tests. * Set default timezone for tests' kibana server. * Add @types for mocha and expect.js. * Implement PR feedback. * Remove added types. * Re-add mocha types. * Remove obsolete comment. * Disable timestamp on uptime app navigation for functional tests. * Undo previous change for default value of function parameter. * Add redirect hack to uptime client to change window location when expected router path is not satisfied.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (elastic#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Create functional UI tests for Overview and Monitor pages. * Add additional waits to functional UI test to try to prevent flakiness. * [ftr/services/superDatePicker] make specialized service * Add data-test-subj value to monitor link. * Remove wait calls from UI tests. * Set default timezone for tests' kibana server. * Add @types for mocha and expect.js. * Implement PR feedback. * Remove added types. * Re-add mocha types. * Remove obsolete comment. * Disable timestamp on uptime app navigation for functional tests. * Undo previous change for default value of function parameter. * Add redirect hack to uptime client to change window location when expected router path is not satisfied.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Create functional UI tests for Overview and Monitor pages. * Add additional waits to functional UI test to try to prevent flakiness. * [ftr/services/superDatePicker] make specialized service * Add data-test-subj value to monitor link. * Remove wait calls from UI tests. * Set default timezone for tests' kibana server. * Add @types for mocha and expect.js. * Implement PR feedback. * Remove added types. * Re-add mocha types. * Remove obsolete comment. * Disable timestamp on uptime app navigation for functional tests. * Undo previous change for default value of function parameter. * Add redirect hack to uptime client to change window location when expected router path is not satisfied.
* Refactor es queries and associated components/endpoints. * Add unit tests, repair broken tests. * [Uptime] Add API functional tests for uptime graphQL (#29128) * Add API functional tests for uptime graphQL. * Remove obsolete code. * Add CI group for UI functional tests. * Delete obsolete code, rename heartbeat es archive. * Refactor adapter methods. * Refactor adapter methods. * Attempt to fix ci-group tag error. * Skip functional app tests until later PR. * Remove unused code. * Optimize test runs. * Add uptime to api test index. * Fix formatting. * Add HB 7.0 data for API tests. * Configure first error_list test to work with 7.x data. * Configure error_list filtered by id to work with 7.x data. * Configure error_list functional tests to work with 7.x data. * Update snapshot test to work with 7.x data. * Update snapshot down filtered test to work with 7.x data. * Configure snapshot up test to work with 7.x data. * Configure ping list tests to work with 7.x data. * Configure monitor list tests to work with 7.x data. * Configure monitor status bar tests to work with 7.x data. * Configure filterBar tests to work with 7.x data. * Configure docCount tests to work with 7.x data. * Simplify code based on PR feedback. * Add loading spinner to monitor page title based on PR feedback. * Rename GQL type based on PR feedback. * Remove use of 'undefined' in ES query based on PR feedback. * Simplify code based on PR feedback. * Add definite size/shard_size for terms agg based on PR feedback. * Simplify ES query based on PR feedback. * Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts Implement PR feedback. Co-Authored-By: justinkambic <justin.kambic@elastic.co> * Increase size for ES errors query based on PR feedback. * Fix hardcoded field in terms filter based on PR feedback. * Simplify get code for monitors function. * Reduce unnecessarily large size for terms agg based on PR feedback. * Pluralize filter bar props. * Refactor filter bar query based on PR feedback. * Update test. * Fix busted GQL query. * Update functional test docs to use data without buggy values. * Update index name in HB functional api test docs. * Update snapshot base functional test. * Make snapshot filter tests pass, fix associated bug. * Configure remaining snapshot e2e tests to work with 7.x data. * Give better variable names and comments for ugly code. * Configure ping list query tests to work with updated 7.x data. * Rename graphql describe block. * Update monitor status bar query tests to work with updated 7.x data. * Update monitor list query tests to work with updated 7.x data. * Update filter bar query to work with updated 7.x data. * Update error list query to work with updated 7.x data. * Update doc count fixture to work with new 7.x data. * Create functional UI tests for Overview and Monitor pages. * Add additional waits to functional UI test to try to prevent flakiness. * [ftr/services/superDatePicker] make specialized service * Add data-test-subj value to monitor link. * Remove wait calls from UI tests. * Set default timezone for tests' kibana server. * Add @types for mocha and expect.js. * Implement PR feedback. * Remove added types. * Re-add mocha types. * Remove obsolete comment. * Disable timestamp on uptime app navigation for functional tests. * Undo previous change for default value of function parameter. * Add redirect hack to uptime client to change window location when expected router path is not satisfied.
Summary
Add functional tests for graphQL API.