-
Notifications
You must be signed in to change notification settings - Fork 15
Add API test for MongoDB SSL remote instance registration #1292
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
base: PMM-7-migration-of-upgrade-tests
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| import pmmTest from '@fixtures/pmmTest'; | ||
| import { AddRemoteInstance } from '@api/remoteInstance.api'; | ||
| import { Timeouts } from '@helpers/timeouts'; | ||
| import { expect } from '@playwright/test'; | ||
|
|
||
| pmmTest.describe('Api tests to verify remote mongodb', () => { | ||
| const container = 'psmdb-server'; | ||
| const remoteServiceName = 'psmdb_ssl_remote_upgrade_service'; | ||
|
|
||
| pmmTest( | ||
| 'PMM-T948 Verify adding MongoDB SSL services remotely via API before upgrade @pre-upgrade', | ||
| async ({ api, cliHelper }) => { | ||
| const ca = cliHelper | ||
| .execSilent(`docker exec ${container} cat /mongodb_certs/ca-certs.pem`) | ||
| .assertSuccess().stdout; | ||
| const clientCert = cliHelper | ||
| .execSilent(`docker exec ${container} cat /mongodb_certs/client.pem`) | ||
| .assertSuccess().stdout; | ||
|
|
||
| const data: AddRemoteInstance = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Lint is red on this head SHA because of this line — Lint run 33617968709: The other six errors in that job are pre-existing on the base branch; this one is the PR's. |
||
| mongodb: { | ||
| add_node: { node_name: 'psmdb_ssl_remote_upgrade_node', node_type: 'NODE_TYPE_REMOTE_NODE' }, | ||
| address: container, | ||
| authentication_mechanism: 'MONGODB-X509', | ||
| cluster: 'mongodb_ssl_remote_cluster', | ||
| pmm_agent_id: 'pmm-server', | ||
| port: '27017', | ||
| qan_mongodb_profiler: true, | ||
| service_name: remoteServiceName, | ||
| tls: true, | ||
| tls_ca: ca, | ||
| tls_certificate_file_password: '', | ||
| tls_certificate_key: clientCert, | ||
| tls_skip_verify: true, | ||
| }, | ||
| }; | ||
|
|
||
| await api.remoteInstanceApi.addRemoteInstance(data); | ||
|
|
||
| await expect | ||
| .poll(() => api.inventoryApi.verifyAgentsAreRunning(remoteServiceName), { | ||
| message: `One or more agents are not running for ${remoteServiceName}`, | ||
| timeout: Timeouts.TWO_MINUTES, | ||
| }) | ||
| .toBe(true); | ||
| }, | ||
| ); | ||
|
Comment on lines
+10
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 This is a second copy of a test that already exists on the base branch: Both are tagged The head commit message says "Fix MongoDB SSL remote API test (PMM-T948)", and reading the CA from |
||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Title is missing the separator: the convention is
PMM-Txxxx - description(e2e_tests/CONTRIBUTING.md:70), which every other upgrade test follows, including the existing PMM-T948 one. If this test survives the thread above, make itPMM-T948 - Verify adding ….