1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/unit
patchback[bot] e69ea28662
[PR #6389/5365647e backport][stable-7] New lookup plug-in: Bitwarden Secrets Manager (#6889)
New lookup plug-in: Bitwarden Secrets Manager (#6389)

* add Bitwarden Secrets Manager lookup

* fix pep8 and yamllint complaints

* fix version_added, add maintainer and copyright notice

* document BWS_ACCESS_TOKEN env var and declare as required

* avoid returning nested list

* update 'value of a secret' example after f6c4492c

* update copyright notice in bitwarden_secrets_manager plugin

thx felixfontein

Co-authored-by: Felix Fontein <felix@fontein.de>

* rename classes to distinguish from existing bw plugin

* use AnsibleLookupError, formatting

* bump version_added to 7.0.0

Co-authored-by: Felix Fontein <felix@fontein.de>

* ci fix: python style guide calls for excessive blank lines

https://peps.python.org/pep-0008/#blank-lines

* first attempt at unit tests for bws lookup

* ci fix: remove trailing newline

* attempt to fix tests object not callable error

* address formatting, tests and pyright suggestions

* reduce scope of mocked code for more real test coverage

only the actual bws CLI call is mocked now, this should enable the
exception thrown test to succeed if I didn't add new problems

* fix undefined variable 'expected_rc'

* fix mocked _run method to return correct data types

* keep list of one element for test case comparison

* bump version_added to 7.2.0

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: jantari <jantari@github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 5365647ee7)

Co-authored-by: jantari <jantari@outlook.de>
2023-07-08 18:09:39 +02:00
..
compat Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
mock Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00
plugins [PR #6389/5365647e backport][stable-7] New lookup plug-in: Bitwarden Secrets Manager (#6889) 2023-07-08 18:09:39 +02:00
requirements.txt [PR #6757/2d6e369d backport][stable-7] [proxmox_template] Fix error while uploading big ISO to Proxmox VE cluster (#6831) 2023-07-02 22:25:14 +02:00
requirements.yml [PR #6549/d643bd57 backport][stable-7] Switch to Ansible Galaxy compatible requirements files for tests (#6552) 2023-05-21 15:11:06 +02:00