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

[PR #9644/250dc113 backport][stable-10] Fb keycloak client improvement #9671

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Feb 1, 2025

This is a backport of PR #9644 as merged into main (250dc11).

SUMMARY

Fix and improve existing tests for keycloak_client module

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

keycloak_client

ADDITIONAL INFORMATION

Run ansible-test integration -v keycloak_client --allow-unsupported --docker fedora40 --docker-network host

Before:

[...]
TASK [keycloak_client : Assert changes not detected in last two tasks (desire when same, and check)] ***
    task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_client-p3ttqf7d-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_client/tasks/main.yml:79
    fatal: [testhost]: FAILED! => {
        "assertion": "check_client_when_present_and_same is not changed",
        "changed": false,
        "evaluated_to": false,
        "msg": "Assertion failed"
    }
[...]

After:

[...]
TASK [keycloak_client : Assert changes not detected in last two tasks (desire when same, and check)] ***
task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_client-bhrae54u-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_client/tasks/main.yml:79
ok: [testhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[...]

* Fix for failed test

TASK [keycloak_client : Assert changes not detected in last two tasks (desire when same, and check)] ***
task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_client-p3ttqf7d-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_client/tasks/main.yml:79
fatal: [testhost]: FAILED! => {
    "assertion": "check_client_when_present_and_same is not changed",
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

* Improved test data to test more scenarios, e.g documentation uses True in examples

* Normalize values in config

* add changelog

* Apply suggestions from code review

Co-authored-by: Alexei Znamensky <[email protected]>

* Update tests/integration/targets/keycloak_client/vars/main.yml

Co-authored-by: Alexei Znamensky <[email protected]>

* Update changelogs/fragments/9644-kc_client-test-improvement-and-fix.yaml

Co-authored-by: Alexei Znamensky <[email protected]>

---------

Co-authored-by: Alexei Znamensky <[email protected]>
(cherry picked from commit 250dc11)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Feb 1, 2025
@felixfontein felixfontein merged commit df496e3 into stable-10 Feb 1, 2025
138 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-10/250dc1139c53ab429196fe64d8f3676e75977c61/pr-9644 branch February 1, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants