Skip to content
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

PMM-12710: Changes for API breaking changes for tests with tag @service accounts #870

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/administration/serviceAccounts_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Scenario('PMM-T1883 Configuring pmm-agent to use service account @service-accoun
}

await I.verifyCommand(`sudo docker exec ${psContainerName} pmm-agent setup --server-username=service_token --server-password=${tokenValue} --server-address=${pmmServerUrl} --server-insecure-tls --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml`);
await I.wait(15);
await I.verifyCommand(`sudo docker exec ${psContainerName} pmm-admin add mysql --username=msandbox --password=msandbox --host=127.0.0.1 --port=3307 --service-name=${newServiceName}`);
await I.wait(60);
const nodeName = (await inventoryAPI.getAllNodes()).generic.find((node) => node.node_name !== 'pmm-server').node_name;
const nodeName = (await inventoryAPI.getAllNodes()).find((node) => node.node_name !== 'pmm-server').node_name;
const nodesUrl = I.buildUrlWithParams(nodesOverviewPage.url, {
from: 'now-1m',
to: 'now',
Expand Down Expand Up @@ -114,7 +115,7 @@ Scenario('PMM-T1900 PMM3 Client pmm-admin unregister w/o force removes nodes & p
await I.verifyCommand(`sudo docker exec ${psContainerName} pmm-admin add mysql --username=msandbox --password=msandbox --host=127.0.0.1 --port=3307 --service-name=${newServiceName}`);
await I.asyncWaitFor(async () => await I.verifyCommand(`docker exec ${psContainerName} pmm-admin list | grep mysqld_exporter | grep -q Running; echo $?`) === '0', 60);

const nodeName = (await inventoryAPI.getAllNodes()).generic.find((node) => node.node_name !== 'pmm-server').node_name;
const nodeName = (await inventoryAPI.getAllNodes()).find((node) => node.node_name !== 'pmm-server').node_name;
const nodesUrl = I.buildUrlWithParams(nodesOverviewPage.url, {
from: 'now-1m',
to: 'now',
Expand Down
4 changes: 2 additions & 2 deletions tests/pages/administration/serviceAccountsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class ServiceAccountsPage {
this.tokenName = locate('//input[@name="tokenName"]');
this.generateTokenButton = locate('//span[text()="Generate token"]');
this.tokenValue = locate('//input[@name="tokenValue"]');
this.disableServiceAccountButton = (username) => locate(`//a[@title="${username}"]//ancestor::tr//span[text()="Disable"]`);
this.enableServiceAccountButton = (username) => locate(`//a[@title="${username}"]//ancestor::tr//span[text()="Enable"]`);
this.disableServiceAccountButton = (username) => locate(`//a[text()="${username}"]//ancestor::tr//span[text()="Disable"]`);
this.enableServiceAccountButton = (username) => locate(`//a[text()="${username}"]//ancestor::tr//span[text()="Enable"]`);
this.confirmDisableButton = I.useDataQA('data-testid Confirm Modal Danger Button');
}

Expand Down
Loading