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-12359 password fix #666

Merged
merged 5 commits into from
Aug 7, 2023
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
17 changes: 10 additions & 7 deletions .github/workflows/upgrade-tests-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ jobs:
# TODO: each variable/group must have comment where it is used
SHA: ${{ inputs.sha || 'null' }}
PMM_BASE_URL: https://127.0.0.1
ADMIN_PASSWORD: admin

### IP and Pass to use in pipeline
PMM_SERVER_IP: 127.0.0.1
ADMIN_PASSWORD: admin1

OKTA_TOKEN: ${{ secrets.OKTA_TOKEN }}
OAUTH_ISSUER_URL: 'https://id-dev.percona.com/oauth2/aus15pi5rjdtfrcH51d7'
Expand Down Expand Up @@ -300,7 +303,7 @@ jobs:
fi
sleep 10
done;
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:admin@127.0.0.1/ping)" != "200" ]]; do sleep 5; done' || false
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:admin@${{ env.PMM_SERVER_IP }}/ping)" != "200" ]]; do sleep 5; done' || false
podman exec pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }}

- name: 'Setup <PMM Sever>: "${{ steps.pmm_server_start_image.outputs.result }}"'
Expand All @@ -310,16 +313,16 @@ jobs:
npm install
sudo npx ts-node ./integration-setup.ts --ci --setup-docker-pmm-server --rbac --pmm-server-docker-tag=${{ steps.pmm_server_start_image.outputs.result }} --pmm-client-version=${{ inputs.pmm_client_start_version }}
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ping)" != "200" ]]; do sleep 5; done' || false
docker exec pmm-integration-server change-admin-password ${{ env.ADMIN_PASSWORD }}

- name: 'Setup <PMM Client: ${{ inputs.pmm_client_start_version }}> and Services'
run: |
# TODO: un-hardcode pmm server ip and admin password
sudo bash ./pmm-qa/pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ inputs.pmm_client_start_version }} --admin_password admin --use_metrics_mode no
sudo bash ./pmm-qa/pmm-tests/pmm2-client-setup.sh --pmm_server_ip ${{ env.PMM_SERVER_IP }} --client_version ${{ inputs.pmm_client_start_version }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no
sudo bash ./pmm-qa/pmm-tests/pmm-framework.sh \
--download \
${{ inputs.services_list }} \
--pmm2 \
--pmm2-server-ip=127.0.0.1
--pmm2-server-ip=${{ env.PMM_SERVER_IP }}
# TODO: change sleep into fluent wait
sleep 30
sudo pmm-admin list
Expand Down Expand Up @@ -381,7 +384,7 @@ jobs:
mkdir -p ~/.config/pmm-server/
echo "PMM_SERVER_IMAGE=docker.io/${{ steps.pmm_server_to_image.outputs.IMAGE }}" > ~/.config/pmm-server/env
source ~/.config/pmm-server/env
podman pull ${{ steps.pmm_server_to_image.outputs.IMAGE }}
podman pull docker.io/${{ steps.pmm_server_to_image.outputs.IMAGE }}
systemctl --user restart pmm-server

# sleep 30
Expand All @@ -399,7 +402,7 @@ jobs:
fi
sleep 10
done;
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:[email protected]/ping)" != "200" ]]; do sleep 5; done' || false
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://admin:${{env.ADMIN_PASSWORD}}@${{ env.PMM_SERVER_IP }}/ping)" != "200" ]]; do sleep 5; done' || false

- name: 'Tests <before PMM Client> upgrade'
working-directory: ./pmm-ui-tests/playwright-tests
Expand Down
2 changes: 1 addition & 1 deletion playwright-tests/tests/inventory/inventory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test.describe('Spec file for PMM inventory tests.', async () => {
test.beforeEach(async ({ page }) => {
await apiHelper.confirmTour(page);
await page.goto('');
await grafanaHelper.authorize(page, 'admin', 'admin');
await grafanaHelper.authorize(page);
});

test('PMM-T1669 Verify PMM Inventory redesign : Layout & Services @inventory @inventory-pre-upgrade @inventory-post-upgrade', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion playwright-tests/tests/rbac/rbac.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test.describe('Spec file for Access Control (RBAC)', async () => {
test.beforeEach(async ({ page }) => {
await apiHelper.confirmTour(page);
await page.goto('');
await grafanaHelper.authorize(page, 'admin', 'admin');
await grafanaHelper.authorize(page);
});

test('PMM-T1573 Verify Access Roles tab on Configuration page @rbac @rbac-pre-upgrade', async ({ page }) => {
Expand Down