-
Notifications
You must be signed in to change notification settings - Fork 8.5k
CCS Smoke Test for Remote Clusters and Index Management #142423
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
Merged
cuff-links
merged 66 commits into
elastic:main
from
cuff-links:CCS_Remote_Clusters_Index_Management_Smoketest
Nov 1, 2022
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
1605104
Removed comment of the issue that was referenced for the skip. But th…
cuff-links f74b2cc
Merge branch 'main' of github.com:elastic/kibana into main
cuff-links 2417dec
Merge branch 'main' of github.com:elastic/kibana into main
cuff-links dcc34ae
Merge branch 'main' of github.com:elastic/kibana
965b476
Merge branch 'main' of github.com:elastic/kibana
cuff-links 6a7bcff
Merge branch 'main' of github.com:elastic/kibana
9f4d356
Merge branch 'main' of github.com:cuff-links/kibana
77ac6f6
Merge branch 'main' of github.com:elastic/kibana
c32deee
Merge branch 'main' of github.com:elastic/kibana
cuff-links 9d29832
Merge branch 'main' of github.com:elastic/kibana
b81531c
Merge branch 'main' of github.com:cuff-links/kibana
86b5eb3
Merge branch 'main' of github.com:elastic/kibana
cuff-links dd1f520
Merge branch 'main' of github.com:cuff-links/kibana
cuff-links 7da9187
Merge branch 'main' of github.com:elastic/kibana
1f743d0
Merge branch 'main' of github.com:cuff-links/kibana
38680df
Merge branch 'main' of github.com:elastic/kibana
1cfb1d1
Merge branch 'main' of github.com:elastic/kibana
cuff-links af0fd4c
Merge branch 'main' of github.com:elastic/kibana
2eb4d72
Merge branch 'main' of github.com:cuff-links/kibana
b97e69c
Added initial tests and page objects for remtoe clusters.
6f73909
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 4b58aad
Fixed the test and test names.
9190d70
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
bbd791b
removed exclusive suite.
f675eda
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine fcaea39
Fixed i18n issue.
68f8a0c
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
a8d8835
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine a1fbd09
Merge branch 'main' into CCS_Remote_Clusters_Index_Management_Smoketest
kibanamachine e1980e6
Added more testing stuff.
6281c51
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 084ef63
Added more testing stuff.
28f9361
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 2779106
Added test and stuff.
8795b66
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
c80d553
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine bfc8ad9
Fixed the tests. The only things to update now are the permissions so…
2311c37
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
4751f7e
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine af37823
Fixed accessibility test to use new ccr page function.
8dfc9cb
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
5f42984
Fixed an error in checks.
cuff-links fc518b7
Merge branch 'main' of github.com:elastic/kibana into CCS_Remote_Clus…
cuff-links 8d8834f
Restored original settings.
f754198
Adjusted cleanup.
723a760
Removed exclusive suite.
daef2f8
Removed unused variable.
9143cec
Removed unused variable.
e170f68
Merge branch 'main' into CCS_Remote_Clusters_Index_Management_Smoketest
kibanamachine 78005c8
Working with perms.
ddc3b24
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
5e1d707
Fixes per comments in PR.
2baf817
added follower index user.
cuff-links 516e203
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine c1a9e05
Merge branch 'main' of github.com:elastic/kibana into CCS_Remote_Clus…
e923187
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
018dda9
Added comment about super user issue.
b1a51cf
Merge branch 'main' into CCS_Remote_Clusters_Index_Management_Smoketest
979298d
Removed the console.log.
cuff-links 01e6012
Merge branch 'main' of github.com:elastic/kibana into CCS_Remote_Clus…
ea56e62
Merge branch 'CCS_Remote_Clusters_Index_Management_Smoketest' of gith…
eea6a14
Merge branch 'main' into CCS_Remote_Clusters_Index_Management_Smoketest
143178a
Merge branch 'main' of github.com:elastic/kibana into CCS_Remote_Clus…
d358085
Fixed nits per PR.
8c91cd0
Removed extra assertion.
795cf15
Merge branch 'main' into CCS_Remote_Clusters_Index_Management_Smoketest
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
x-pack/test/functional/apps/remote_clusters/ccs/remote_clusters_index_management_flow.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import expect from '@kbn/expect'; | ||
| import { FtrProviderContext } from '../../../ftr_provider_context'; | ||
|
|
||
| export default ({ getPageObjects, getService }: FtrProviderContext) => { | ||
| const pageObjects = getPageObjects([ | ||
| 'common', | ||
| 'remoteClusters', | ||
| 'indexManagement', | ||
| 'crossClusterReplication', | ||
| ]); | ||
| const security = getService('security'); | ||
| const retry = getService('retry'); | ||
| const testSubjects = getService('testSubjects'); | ||
| const remoteEs = getService('remoteEs' as 'es'); | ||
cuff-links marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const localEs = getService('es'); | ||
|
|
||
| describe('CCS Remote Clusters > Index Management', function () { | ||
| const leaderName = 'my-index'; | ||
| const followerName = 'my-follower'; | ||
| before(async () => { | ||
| await security.testUser.setRoles(['superuser']); | ||
| // This test is temporarily using superuser because of an issue with the permissions | ||
| // of the follower index creation wizard. There is an open issue to address the issue. | ||
| // We can change the permissions to use follower_index_user once the issue is fixed. | ||
| // https://github.com/elastic/kibana/issues/143720 | ||
| // await security.testUser.setRoles(['follower_index_user']); | ||
| }); | ||
|
|
||
| describe('Remote Clusters', function () { | ||
| before(async () => { | ||
| await pageObjects.common.navigateToApp('remoteClusters'); | ||
| }); | ||
|
|
||
| it('Verify "ftr-remote" remote cluster exists', async () => { | ||
| await retry.waitFor('table to be visible', async () => { | ||
| return await testSubjects.isDisplayed('remoteClusterListTable'); | ||
| }); | ||
| const remotes = await pageObjects.remoteClusters.getRemoteClustersList(); | ||
| expect(remotes.length).to.eql(1); | ||
| expect(remotes[0].remoteName).to.eql('ftr-remote'); | ||
| expect(remotes[0].remoteAddress).to.contain('localhost'); | ||
| expect(remotes[0].remoteStatus).to.eql('Connected'); | ||
| expect(remotes[0].remoteConnectionCount).to.eql('1'); | ||
| expect(remotes[0].remoteMode).to.eql('default'); | ||
| }); | ||
| }); | ||
|
|
||
| describe('Cross Cluster Replication', function () { | ||
| before(async () => { | ||
| await remoteEs.indices.create({ | ||
| index: leaderName, | ||
| body: { | ||
| settings: { number_of_shards: 1, soft_deletes: { enabled: true } }, | ||
| }, | ||
| }); | ||
| await pageObjects.common.navigateToApp('crossClusterReplication'); | ||
| await retry.waitFor('indices table to be visible', async () => { | ||
| return await testSubjects.isDisplayed('createFollowerIndexButton'); | ||
| }); | ||
| }); | ||
| it('Create Follower Index', async () => { | ||
| await pageObjects.crossClusterReplication.clickCreateFollowerIndexButton(); | ||
| await pageObjects.crossClusterReplication.createFollowerIndex( | ||
| leaderName, | ||
| followerName, | ||
| true, | ||
| '1s' | ||
| ); | ||
| }); | ||
| }); | ||
| describe('Index Management', function () { | ||
| before(async () => { | ||
cuff-links marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| await remoteEs.index({ | ||
| index: leaderName, | ||
| body: { a: 'b' }, | ||
| }); | ||
| await pageObjects.common.navigateToApp('indexManagement'); | ||
| await retry.waitForWithTimeout('indice table to be visible', 15000, async () => { | ||
| return await testSubjects.isDisplayed('indicesList'); | ||
| }); | ||
| }); | ||
| it('Verify that the follower index is duplicating from the remote.', async () => { | ||
| await pageObjects.indexManagement.clickIndiceAt(0); | ||
| await pageObjects.indexManagement.performIndexActionInDetailPanel('flush'); | ||
| await testSubjects.click('euiFlyoutCloseButton'); | ||
| await pageObjects.common.navigateToApp('indexManagement'); | ||
| await retry.waitForWithTimeout('indice table to be visible', 15000, async () => { | ||
| return await testSubjects.isDisplayed('indicesList'); | ||
| }); | ||
|
|
||
| const indicesList = await pageObjects.indexManagement.getIndexList(); | ||
| const followerIndex = indicesList[0]; | ||
| expect(followerIndex.indexDocuments).to.eql('1'); | ||
| }); | ||
| }); | ||
|
|
||
| after(async () => { | ||
| await localEs.indices.delete({ | ||
| index: followerName, | ||
| }); | ||
| await remoteEs.indices.delete({ | ||
| index: leaderName, | ||
| }); | ||
| await security.testUser.restoreDefaults(); | ||
cuff-links marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }); | ||
| }); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.