URL: https://github.com/freeipa/freeipa/pull/6016 Author: flo-renaud Title: #6016: ipatests: fix expected msg in tasks.run_ssh_cmd Action: opened
PR body: """ OpenSSH 8.7p1 changed the message logged on successful authentication (see commit [9e1882ef6489a7dd16b6d7794af96629cae61a53](https://github.com/openssh/openssh-portable/commit/9e1882ef6489a7dd16b6d7794af96629cae61a53#diff-9b68b8ea7f8914f8a6ecc452a600d0e886b13f3b5af14fa80261d66c4723b8fd)). As a result, the method run_ssh_cmd is failing and needs to be adapted in order to be compatible with old and new openssh versions. Fixes: https://pagure.io/freeipa/issue/8989 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6016/head:pr6016 git checkout pr6016
From 81e9a0a3a46cf3f3c1926b22bde64e897dc985dc Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <f...@redhat.com> Date: Mon, 13 Sep 2021 09:14:27 +0200 Subject: [PATCH 1/2] ipatests: fix expected msg in tasks.run_ssh_cmd OpenSSH 8.7p1 changed the message logged on successful authentication (see commit 9e1882ef6489a7dd16b6d7794af96629cae61a53). As a result, the method run_ssh_cmd is failing and needs to be adapted in order to be compatible with old and new openssh versions. Fixes: https://pagure.io/freeipa/issue/8989 --- ipatests/pytest_ipa/integration/tasks.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 46995e7dd22..2ca68c1a075 100755 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -2767,8 +2767,11 @@ def run_ssh_cmd( if auth_method == "password": if expect_auth_success is True: - assert "Authentication succeeded (keyboard-interactive)" in \ - stderr + patterns = [ + 'Authenticated to .* using "keyboard-interactive"', + 'Authentication succeeded (keyboard-interactive)' + ] + assert any(re.search(pattern, stderr) for pattern in patterns) # do not assert the return code: # it can be >0 if the command failed. elif expect_auth_failure is True: @@ -2777,7 +2780,11 @@ def run_ssh_cmd( assert "Authentication succeeded" not in stderr elif auth_method == "key": if expect_auth_success is True: - assert "Authentication succeeded (publickey)" in stderr + patterns = [ + 'Authenticated to .* using "publickey"', + 'Authentication succeeded (publickey)' + ] + assert any(re.search(pattern, stderr) for pattern in patterns) # do not assert the return code: # it can be >0 if the command failed. elif expect_auth_failure is True: From 9cd571245003ccb980411a75e2463a31abd259ff Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <f...@redhat.com> Date: Mon, 13 Sep 2021 09:22:11 +0200 Subject: [PATCH 2/2] Temp commit --- .freeipa-pr-ci.yaml | 2 +- ipatests/prci_definitions/temp_commit.yaml | 132 ++++++++++++++++++++- 2 files changed, 131 insertions(+), 3 deletions(-) diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml index abcf8c5b634..80656690080 120000 --- a/.freeipa-pr-ci.yaml +++ b/.freeipa-pr-ci.yaml @@ -1 +1 @@ -ipatests/prci_definitions/gating.yaml \ No newline at end of file +ipatests/prci_definitions/temp_commit.yaml \ No newline at end of file diff --git a/ipatests/prci_definitions/temp_commit.yaml b/ipatests/prci_definitions/temp_commit.yaml index 4b0398b9218..f3d7a226f8d 100644 --- a/ipatests/prci_definitions/temp_commit.yaml +++ b/ipatests/prci_definitions/temp_commit.yaml @@ -61,14 +61,142 @@ jobs: timeout: 1800 topology: *build - fedora-latest/temp_commit: + fedora-latest/test_commands: requires: [fedora-latest/build] priority: 50 job: class: RunPytest args: build_url: '{fedora-latest/build_url}' - test_suite: test_integration/test_REPLACEME.py + test_suite: test_integration/test_commands.py template: *ci-master-latest + timeout: 5400 + topology: *master_1repl_1client + + fedora-latest/test_otp: + requires: [fedora-latest/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-latest/build_url}' + test_suite: test_integration/test_otp.py + template: *ci-master-latest + timeout: 3600 + topology: *master_1repl + + fedora-latest/test_user_permissions: + requires: [fedora-latest/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-latest/build_url}' + test_suite: test_integration/test_user_permissions.py + template: *ci-master-latest + timeout: 3600 + topology: *master_1repl_1client + + fedora-latest/test_webui_host: + requires: [fedora-latest/build] + priority: 50 + job: + class: RunWebuiTests + args: + build_url: '{fedora-latest/build_url}' + test_suite: test_webui/test_host.py + template: *ci-master-latest + timeout: 3600 + topology: *ipaserver + + fedora-latest/test_webui_service: + requires: [fedora-latest/build] + priority: 50 + job: + class: RunWebuiTests + args: + build_url: '{fedora-latest/build_url}' + test_suite: test_webui/test_service.py + template: *ci-master-latest + timeout: 2400 + topology: *ipaserver + + fedora-rawhide/build: + requires: [] + priority: 100 + job: + class: Build + args: + git_repo: '{git_repo}' + git_refspec: '{git_refspec}' + template: &ci-master-frawhide + name: freeipa/ci-master-frawhide + version: 0.4.2 + timeout: 1800 + topology: *build + + fedora-rawhide/test_commands: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_integration/test_commands.py + template: *ci-master-frawhide + timeout: 5400 + topology: *master_1repl_1client + + fedora-rawhide/test_otp: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_integration/test_otp.py + template: *ci-master-frawhide + timeout: 3600 + topology: *master_1repl + + fedora-rawhide/test_user_permissions: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_integration/test_user_permissions.py + template: *ci-master-frawhide timeout: 3600 topology: *master_1repl_1client + + fedora-rawhide/test_webui_host: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunWebuiTests + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_webui/test_host.py + template: *ci-master-frawhide + timeout: 3600 + topology: *ipaserver + + fedora-rawhide/test_webui_service: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunWebuiTests + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_webui/test_service.py + template: *ci-master-frawhide + timeout: 2400 + topology: *ipaserver +
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure