Skip to content

Commit

Permalink
[8.6] change remote cluster from data to ftr-remote (#145435) (#145473)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.6`:
- [change remote cluster from data to ftr-remote
(#145435)](#145435)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lee
Drengenberg","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-16T22:22:54Z","message":"change
remote cluster from data to ftr-remote (#145435)\n\n##
Summary\r\n\r\nThis change is for CCS tests which only run in
integration-test jobs.\r\nThis change aligns the name of the remote
cluster to ftr-remote so that\r\nintegration test can run all the
existing CCS tests.\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"dc4d88175565db0e438c6db13509ec672548167f","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","backport:prev-minor","v8.7.0"],"number":145435,"url":"https://github.com/elastic/kibana/pull/145435","mergeCommit":{"message":"change
remote cluster from data to ftr-remote (#145435)\n\n##
Summary\r\n\r\nThis change is for CCS tests which only run in
integration-test jobs.\r\nThis change aligns the name of the remote
cluster to ftr-remote so that\r\nintegration test can run all the
existing CCS tests.\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"dc4d88175565db0e438c6db13509ec672548167f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145435","number":145435,"mergeCommit":{"message":"change
remote cluster from data to ftr-remote (#145435)\n\n##
Summary\r\n\r\nThis change is for CCS tests which only run in
integration-test jobs.\r\nThis change aligns the name of the remote
cluster to ftr-remote so that\r\nintegration test can run all the
existing CCS tests.\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"dc4d88175565db0e438c6db13509ec672548167f"}}]}]
BACKPORT-->

Co-authored-by: Lee Drengenberg <[email protected]>
  • Loading branch information
kibanamachine and Lee Drengenberg authored Nov 16, 2022
1 parent 2fb7777 commit 71b42ca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export default function ({ getService, getPageObjects }) {
});
it('it should be able to access remote data', async () => {
await PageObjects.console.enterRequest(
'\nGET data:makelogs工程-*/_search\n {\n "query": {\n "bool": {\n "must": [\n {"match": {"extension" : "jpg"'
'\nGET ftr-remote:makelogs工程-*/_search\n {\n "query": {\n "bool": {\n "must": [\n {"match": {"extension" : "jpg"'
);
await PageObjects.console.clickPlay();
await retry.try(async () => {
const actualResponse = await PageObjects.console.getResponse();
expect(actualResponse).to.contain('"_index": "data:makelogs工程-0"');
expect(actualResponse).to.contain('"_index": "ftr-remote:makelogs工程-0"');
});
});
});
Expand Down
36 changes: 22 additions & 14 deletions x-pack/test/stack_functional_integration/apps/ccs/ccs_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,22 @@ export default ({ getService, getPageObjects }) => {
expect(patternName).to.be('local:makelogs工程*');
});

it('create remote data makelogs index pattern', async () => {
log.debug('create remote data makelogs工程 index pattern');
await PageObjects.settings.createIndexPattern('data:makelogs工程*');
it('create ftr-remote makelogs index pattern', async () => {
log.debug('create ftr-remote makelogs工程 index pattern');
await PageObjects.settings.createIndexPattern('ftr-remote:makelogs工程*');
const patternName = await PageObjects.settings.getIndexPageHeading();
expect(patternName).to.be('data:makelogs工程*');
expect(patternName).to.be('ftr-remote:makelogs工程*');
});

it('create comma separated index patterns for data and local makelogs index pattern', async () => {
it('create comma separated index patterns for ftr-remote and local makelogs index pattern', async () => {
log.debug(
'create comma separated index patterns for data and local makelogs工程 index pattern'
'create comma separated index patterns for ftr-remote and local makelogs工程 index pattern'
);
await PageObjects.settings.createIndexPattern(
'ftr-remote:makelogs工程-*,local:makelogs工程-*'
);
await PageObjects.settings.createIndexPattern('data:makelogs工程-*,local:makelogs工程-*');
const patternName = await PageObjects.settings.getIndexPageHeading();
expect(patternName).to.be('data:makelogs工程-*,local:makelogs工程-*');
expect(patternName).to.be('ftr-remote:makelogs工程-*,local:makelogs工程-*');
});

it('create index pattern for data from both clusters', async () => {
Expand All @@ -147,8 +149,8 @@ export default ({ getService, getPageObjects }) => {
});
});

it('data:makelogs(star) should discover data from remote', async function () {
await PageObjects.discover.selectIndexPattern('data:makelogs工程*');
it('ftr-remote:makelogs(star) should discover data from remote', async function () {
await PageObjects.discover.selectIndexPattern('ftr-remote:makelogs工程*');
await retry.tryForTime(40000, async () => {
const hitCount = await PageObjects.discover.getHitCount();
log.debug('### hit count = ' + hitCount);
Expand All @@ -166,8 +168,10 @@ export default ({ getService, getPageObjects }) => {
});
});

it('data:makelogs-star,local:makelogs-star should discover data from both clusters', async function () {
await PageObjects.discover.selectIndexPattern('data:makelogs工程-*,local:makelogs工程-*');
it('ftr-remote:makelogs-star,local:makelogs-star should discover data from both clusters', async function () {
await PageObjects.discover.selectIndexPattern(
'ftr-remote:makelogs工程-*,local:makelogs工程-*'
);
await retry.tryForTime(40000, async () => {
const hitCount = await PageObjects.discover.getHitCount();
log.debug('### hit count = ' + hitCount);
Expand All @@ -176,7 +180,9 @@ export default ({ getService, getPageObjects }) => {
});

it('should reload the saved search with persisted query to show the initial hit count', async function () {
await PageObjects.discover.selectIndexPattern('data:makelogs工程-*,local:makelogs工程-*');
await PageObjects.discover.selectIndexPattern(
'ftr-remote:makelogs工程-*,local:makelogs工程-*'
);
// apply query some changes
await queryBar.setQuery('success');
await queryBar.submitQuery();
Expand All @@ -190,7 +196,9 @@ export default ({ getService, getPageObjects }) => {
});

it('should add a phrases filter', async function () {
await PageObjects.discover.selectIndexPattern('data:makelogs工程-*,local:makelogs工程-*');
await PageObjects.discover.selectIndexPattern(
'ftr-remote:makelogs工程-*,local:makelogs工程-*'
);
const hitCountNumber = await PageObjects.discover.getHitCount();
const originalHitCount = parseInt(hitCountNumber.replace(/\,/g, ''));
await filterBar.addFilter('extension.keyword', 'is', 'jpg');
Expand Down

0 comments on commit 71b42ca

Please sign in to comment.