kibana/test/common/config.js

73 lines
2.8 KiB
JavaScript
Raw Normal View History

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
[Newsfeed] UI plugin for Kibana (#49579) * Added base folder structure for Newsfeed plugin * Added base folders for lib and component * Added newsfeed button to navigation controls on the right side * add getApi() to return api data observable (#49581) * Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin * Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this * Added subscribe on fetch newsfeed change * Add NewsfeedApiDriver class (#49710) * add NewsfeedApiDriver class * fix xpack prefix * add corner case handling * Added data binding to the ui * added EuiHeaderAlert style overrides (#49739) * Fixed due to comments on PR * add missing fields to NewsfeedItem and FetchResult * fix templating of service url * gracefully handle temporary request failure * Mapped missing fields for data and badge * Fixed typos issues * integrate i18n.getLocale() * allow service url root to be changed in dev mode * replace a lot of consts with config * fix flyout height (#49809) * Add "error" field to FetchResult: Error | null * simplify fetch error handling * Do not store hash for items that are filtered out * add expireOn in case it is useful to UI * always use staging url for dev config * unit test for newsfeed api driver * simplify modelItems * Fixed eslint errors * Fixed label translations * Add unit test for concatenating the stored hashes with the new * add newsfeed to i18n.json * Fixed expression error * --wip-- [skip ci] * fix parse error * fix test * test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests * add tests for getApi() * add tests for getApi * Added no news page * fix fetch not happening after page refresh with sessionStorage primed * test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests * Added loading screen * Small fixes due to comments * Fixed issue with stop fetching news on error catch * test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit * Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. * Fixed typo issue in label name * polish the code changes * Add simple jest/enzyme tests for the components * honor utc format * Filter pre-published items * Fall back to en * retry tests * comment clarfication * Setup newsfeed service fixture from test/common/config * Added base functional tests for newsfeed functionality * valid urlroot is for prod * add documentation for the supported enabled setting * more urlRoot * --wip-- [skip ci] * add the before for fn * add ui_capabilties test * update jest snapshot * Fixed failing test * finish newsfeed error functional test * include ui_capability config * error case testing in ci group 6 * refactor(newsfeed): moved newsfeed api call so that it is done before its use * code polish * enabled newsfeed_err test in CI
2019-11-13 16:48:34 +01:00
import path from 'path';
import { format as formatUrl } from 'url';
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
import { services } from './services';
[ftr] make room for more projects (#11848) Squashed commit of the following: commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 09:19:22 2017 -0700 [test/*/fixtures] rename es_archives to es_archiver commit d3667457c78e88e2d6974f3c38dd0fe61b846b91 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 08:22:03 2017 -0700 [ftr/config] fix default directory value functions commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 07:30:52 2017 -0700 fix import paths commit fcb65a877d54b5b1d36b8c81f1264b36845e826e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 21:39:57 2017 -0700 [grunt/ftr] use named exports for configs commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:50:04 2017 -0700 [test] remove unnecessary directory definitions commit 0c28984669768482f0a2ee7fc2800d5bcaf49025 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:46:29 2017 -0700 [ftr/config] make default directories relative to config path commit cd2f33612624cacffec138797f3fc0f4ecb46cca Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:32:12 2017 -0700 [test/common] put server config into common commit 7851ed811a236576c63bd20850b3ef2099be2a4e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:18:20 2017 -0700 [grunt] "deprecate" test:api:runner task commit b2ac4c26593a1947c94f0168191fe8123ff74122 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:15:41 2017 -0700 [ftr] accept the project name as an unnamed arg commit 47e292894fc70c0a04883403c50c5d2ae0738d76 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:56:34 2017 -0700 [ftr/grunt] convert ftr task to multi-task with config commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:54:54 2017 -0700 [test/functional] move fixtures into test/functional project commit 05994e9c92cf134c58f831c285b3b522a801acbc Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:02:51 2017 -0700 [src/test_utils] merge with test/utils directory commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:53:00 2017 -0700 [test/api_integration] migrate api tests to functional test runner commit ca328c34648dd7e07f70e1844e07cfc392e41103 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:50:12 2017 -0700 [esArchiver] refresh modified indices after load commit cde74a540850fd97578f441d6dccaefd1444e656 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:46:48 2017 -0700 [test/functional] move shared services into test/common commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:51:23 2017 -0700 [scripts/mocha] run _mocha script when debugging commit 1cc80600d90e318d4738920aa557d124075a4570 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:48:12 2017 -0700 [ftr/config] allow child config files to have no testFiles config commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 21:52:26 2017 -0700 [ftr] move screenshots into test/functional
2017-05-18 03:53:45 +02:00
2020-05-22 09:08:58 +02:00
export default function () {
const servers = {
kibana: kbnTestConfig.getUrlParts(),
elasticsearch: esTestConfig.getUrlParts(),
};
[ftr] make room for more projects (#11848) Squashed commit of the following: commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 09:19:22 2017 -0700 [test/*/fixtures] rename es_archives to es_archiver commit d3667457c78e88e2d6974f3c38dd0fe61b846b91 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 08:22:03 2017 -0700 [ftr/config] fix default directory value functions commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 07:30:52 2017 -0700 fix import paths commit fcb65a877d54b5b1d36b8c81f1264b36845e826e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 21:39:57 2017 -0700 [grunt/ftr] use named exports for configs commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:50:04 2017 -0700 [test] remove unnecessary directory definitions commit 0c28984669768482f0a2ee7fc2800d5bcaf49025 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:46:29 2017 -0700 [ftr/config] make default directories relative to config path commit cd2f33612624cacffec138797f3fc0f4ecb46cca Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:32:12 2017 -0700 [test/common] put server config into common commit 7851ed811a236576c63bd20850b3ef2099be2a4e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:18:20 2017 -0700 [grunt] "deprecate" test:api:runner task commit b2ac4c26593a1947c94f0168191fe8123ff74122 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:15:41 2017 -0700 [ftr] accept the project name as an unnamed arg commit 47e292894fc70c0a04883403c50c5d2ae0738d76 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:56:34 2017 -0700 [ftr/grunt] convert ftr task to multi-task with config commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:54:54 2017 -0700 [test/functional] move fixtures into test/functional project commit 05994e9c92cf134c58f831c285b3b522a801acbc Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:02:51 2017 -0700 [src/test_utils] merge with test/utils directory commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:53:00 2017 -0700 [test/api_integration] migrate api tests to functional test runner commit ca328c34648dd7e07f70e1844e07cfc392e41103 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:50:12 2017 -0700 [esArchiver] refresh modified indices after load commit cde74a540850fd97578f441d6dccaefd1444e656 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:46:48 2017 -0700 [test/functional] move shared services into test/common commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:51:23 2017 -0700 [scripts/mocha] run _mocha script when debugging commit 1cc80600d90e318d4738920aa557d124075a4570 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:48:12 2017 -0700 [ftr/config] allow child config files to have no testFiles config commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 21:52:26 2017 -0700 [ftr] move screenshots into test/functional
2017-05-18 03:53:45 +02:00
return {
servers,
esTestCluster: {
license: 'oss',
from: 'snapshot',
2019-12-13 23:44:04 +01:00
serverArgs: [],
[ftr] make room for more projects (#11848) Squashed commit of the following: commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 09:19:22 2017 -0700 [test/*/fixtures] rename es_archives to es_archiver commit d3667457c78e88e2d6974f3c38dd0fe61b846b91 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 08:22:03 2017 -0700 [ftr/config] fix default directory value functions commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 07:30:52 2017 -0700 fix import paths commit fcb65a877d54b5b1d36b8c81f1264b36845e826e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 21:39:57 2017 -0700 [grunt/ftr] use named exports for configs commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:50:04 2017 -0700 [test] remove unnecessary directory definitions commit 0c28984669768482f0a2ee7fc2800d5bcaf49025 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:46:29 2017 -0700 [ftr/config] make default directories relative to config path commit cd2f33612624cacffec138797f3fc0f4ecb46cca Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:32:12 2017 -0700 [test/common] put server config into common commit 7851ed811a236576c63bd20850b3ef2099be2a4e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:18:20 2017 -0700 [grunt] "deprecate" test:api:runner task commit b2ac4c26593a1947c94f0168191fe8123ff74122 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:15:41 2017 -0700 [ftr] accept the project name as an unnamed arg commit 47e292894fc70c0a04883403c50c5d2ae0738d76 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:56:34 2017 -0700 [ftr/grunt] convert ftr task to multi-task with config commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:54:54 2017 -0700 [test/functional] move fixtures into test/functional project commit 05994e9c92cf134c58f831c285b3b522a801acbc Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:02:51 2017 -0700 [src/test_utils] merge with test/utils directory commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:53:00 2017 -0700 [test/api_integration] migrate api tests to functional test runner commit ca328c34648dd7e07f70e1844e07cfc392e41103 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:50:12 2017 -0700 [esArchiver] refresh modified indices after load commit cde74a540850fd97578f441d6dccaefd1444e656 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:46:48 2017 -0700 [test/functional] move shared services into test/common commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:51:23 2017 -0700 [scripts/mocha] run _mocha script when debugging commit 1cc80600d90e318d4738920aa557d124075a4570 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:48:12 2017 -0700 [ftr/config] allow child config files to have no testFiles config commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 21:52:26 2017 -0700 [ftr] move screenshots into test/functional
2017-05-18 03:53:45 +02:00
},
kbnTestServer: {
buildArgs: [],
sourceArgs: ['--no-base-path', '--env.name=development'],
serverArgs: [
'--logging.json=false',
`--server.port=${kbnTestConfig.getPort()}`,
'--status.allowAnonymous=true',
`--elasticsearch.hosts=${formatUrl(servers.elasticsearch)}`,
`--elasticsearch.username=${kibanaServerTestUser.username}`,
`--elasticsearch.password=${kibanaServerTestUser.password}`,
`--home.disableWelcomeScreen=true`,
// Needed for async search functional tests to introduce a delay
`--data.search.aggs.shardDelay.enabled=true`,
`--security.showInsecureClusterWarning=false`,
'--telemetry.banner=false',
'--telemetry.optIn=false',
// These are *very* important to have them pointing to staging
'--telemetry.url=https://telemetry-staging.elastic.co/xpack/v2/send',
'--telemetry.optInStatusUrl=https://telemetry-staging.elastic.co/opt_in_status/v2/send',
`--server.maxPayloadBytes=1679958`,
[Newsfeed] UI plugin for Kibana (#49579) * Added base folder structure for Newsfeed plugin * Added base folders for lib and component * Added newsfeed button to navigation controls on the right side * add getApi() to return api data observable (#49581) * Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin * Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this * Added subscribe on fetch newsfeed change * Add NewsfeedApiDriver class (#49710) * add NewsfeedApiDriver class * fix xpack prefix * add corner case handling * Added data binding to the ui * added EuiHeaderAlert style overrides (#49739) * Fixed due to comments on PR * add missing fields to NewsfeedItem and FetchResult * fix templating of service url * gracefully handle temporary request failure * Mapped missing fields for data and badge * Fixed typos issues * integrate i18n.getLocale() * allow service url root to be changed in dev mode * replace a lot of consts with config * fix flyout height (#49809) * Add "error" field to FetchResult: Error | null * simplify fetch error handling * Do not store hash for items that are filtered out * add expireOn in case it is useful to UI * always use staging url for dev config * unit test for newsfeed api driver * simplify modelItems * Fixed eslint errors * Fixed label translations * Add unit test for concatenating the stored hashes with the new * add newsfeed to i18n.json * Fixed expression error * --wip-- [skip ci] * fix parse error * fix test * test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests * add tests for getApi() * add tests for getApi * Added no news page * fix fetch not happening after page refresh with sessionStorage primed * test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests * Added loading screen * Small fixes due to comments * Fixed issue with stop fetching news on error catch * test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit * Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. * Fixed typo issue in label name * polish the code changes * Add simple jest/enzyme tests for the components * honor utc format * Filter pre-published items * Fall back to en * retry tests * comment clarfication * Setup newsfeed service fixture from test/common/config * Added base functional tests for newsfeed functionality * valid urlroot is for prod * add documentation for the supported enabled setting * more urlRoot * --wip-- [skip ci] * add the before for fn * add ui_capabilties test * update jest snapshot * Fixed failing test * finish newsfeed error functional test * include ui_capability config * error case testing in ci group 6 * refactor(newsfeed): moved newsfeed api call so that it is done before its use * code polish * enabled newsfeed_err test in CI
2019-11-13 16:48:34 +01:00
// newsfeed mock service
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'newsfeed')}`,
`--newsfeed.service.urlRoot=${servers.kibana.protocol}://${servers.kibana.hostname}:${servers.kibana.port}`,
`--newsfeed.service.pathTemplate=/api/_newsfeed-FTS-external-service-simulators/kibana/v{VERSION}.json`,
// code coverage reporting plugin
...(!!process.env.CODE_COVERAGE
? [`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'coverage')}`]
: []),
],
},
2019-12-13 23:44:04 +01:00
services,
[ftr] make room for more projects (#11848) Squashed commit of the following: commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 09:19:22 2017 -0700 [test/*/fixtures] rename es_archives to es_archiver commit d3667457c78e88e2d6974f3c38dd0fe61b846b91 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 08:22:03 2017 -0700 [ftr/config] fix default directory value functions commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781 Author: spalger <spalger@users.noreply.github.com> Date: Wed May 17 07:30:52 2017 -0700 fix import paths commit fcb65a877d54b5b1d36b8c81f1264b36845e826e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 21:39:57 2017 -0700 [grunt/ftr] use named exports for configs commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:50:04 2017 -0700 [test] remove unnecessary directory definitions commit 0c28984669768482f0a2ee7fc2800d5bcaf49025 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:46:29 2017 -0700 [ftr/config] make default directories relative to config path commit cd2f33612624cacffec138797f3fc0f4ecb46cca Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:32:12 2017 -0700 [test/common] put server config into common commit 7851ed811a236576c63bd20850b3ef2099be2a4e Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:18:20 2017 -0700 [grunt] "deprecate" test:api:runner task commit b2ac4c26593a1947c94f0168191fe8123ff74122 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 18:15:41 2017 -0700 [ftr] accept the project name as an unnamed arg commit 47e292894fc70c0a04883403c50c5d2ae0738d76 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:56:34 2017 -0700 [ftr/grunt] convert ftr task to multi-task with config commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:54:54 2017 -0700 [test/functional] move fixtures into test/functional project commit 05994e9c92cf134c58f831c285b3b522a801acbc Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 17:02:51 2017 -0700 [src/test_utils] merge with test/utils directory commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:53:00 2017 -0700 [test/api_integration] migrate api tests to functional test runner commit ca328c34648dd7e07f70e1844e07cfc392e41103 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:50:12 2017 -0700 [esArchiver] refresh modified indices after load commit cde74a540850fd97578f441d6dccaefd1444e656 Author: spalger <spalger@users.noreply.github.com> Date: Tue May 16 16:46:48 2017 -0700 [test/functional] move shared services into test/common commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:51:23 2017 -0700 [scripts/mocha] run _mocha script when debugging commit 1cc80600d90e318d4738920aa557d124075a4570 Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 22:48:12 2017 -0700 [ftr/config] allow child config files to have no testFiles config commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f Author: spalger <spalger@users.noreply.github.com> Date: Mon May 15 21:52:26 2017 -0700 [ftr] move screenshots into test/functional
2017-05-18 03:53:45 +02:00
};
}