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/test/units
Guillaume Martinez 959939b866 Refactor gitlab modules (#51141)
* gitlab_group: refactor module

* gitlab_user: refactor module

* gitlab_group, gitlab_user; pylint

* gitlab_project: refactor module

* gitlab_group, gitlab_project, gitlab_user: Enchance modules

- Add generic loop to update object
- Enchance return messages
- PyLint

* gitlab_runner: refactor module

* gitlab_hooks: refactor module

* gitlab_deploy_key: refactor module

* gitlab_group: enchance module and documentation

- Enchange function arguments
- Add check_mode break
- Rewrite module documentation

* gitlab_hook: enchance module and documentation

- Rewrite documentation
- Enchance function parameters
- Rename functions

* gitlab_project: enchance module and documentation

- Rewrite documentation
- Enchance function parameters
- Add try/except on project creation

* gitlab_runner: enchance module and documentation

- Rewrite documentation
- Fix Copyright
- Enchance function arguments
- Add check_mode break
- Add missing function: deletion

* gitlab_user: enchance module and documentation

- Rewrite documentation
- Enchance function parameters
- Add check_mode break
- Add try/except on user creation

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project,
gitlab_runner, gitlab_user: Fix residual bugs

- Fix Copyright
- Fix result messages
- Add missing check_mode break

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: pylint

* gitlab_runner: Add substitution function for 'cmp' in python3

* unit-test: remove deprecated gitlab module tests

- gitlab_deploy_key
- gitlab_hooks
- gitlab_project

Actually, they can't be reused because of the modification of the way that the module communicate with the Gitlab instance. It doesn't make direct call to the API, now it use a python library that do the job. So using a pytest mocker to test the module won't work.

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: add copyright

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: Support old parameters format

* module_utils Gitlab: Edit copyright

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project,
gitlab_runner, gitlab_user: Unifying module inputs

- Rename verify_ssl into validate_certs to match standards
- Remove unused alias parameters
- Unify parameters type and requirement
- Reorder list order

* gitlab_deploy_key, gitlab_group, gitlab_hooks, gitlab_project, gitlab_runner, gitlab_user: Unifying module outputs

- Use standard output parameter "msg" instead of "return"
- Use snail_case for return values instead of camelCase

* validate-module: remove sanity ignore

* BOTMETA: remove gitlab_* test

- This tests need to be completely rewriten because of the refactoring
of these modules
- TodoList Community Wiki was updated

* gitlab_user: Fix group identifier

* gitlab_project: Fix when group was empty

* gitlab_deploy_key: edit return msg

* module_utils gitlab: fall back to user namespace is project not found

* gitlab modules: Add units tests

* unit test: gitlab module fake current user

* gitlab_user: fix access_level verification

* gitlab unit tests: use decoration instead of with statement

* unit tests: gitlab module skip python 2.6

* unit tests: gitlab module skip library import if python 2.6

* gitlab unit tests: use builtin unittest class

* gitlab unit tests: use custom test class

* unit test: gitlab module lint

* unit tests: move gitlab utils

* unit test: gitlab fix imports

* gitlab_module: edit requirement

python-gitlab library require python >= 2.7

* gitlab_module: add myself as author

* gitlab_modules: add python encoding tag

* gitlab_modules: keep consistency between variable name "validate_certs"

* gitlab_modules: enchance documentation

* gitlab_runner: fix syntax error in documentation

* gitlab_module: use basic_auth module_utils and add deprecation warning

* gitlab_module: documentation corrections

* gitlab_module: python lint

* gitlab_module: deprecate options and aliases for ansible 2.10

* gitlab_group: don't use 'local_action' is documentation example

* gitlab_module: correct return messages

* gitlab_module: use module_util 'missing_required_lib' when python library is missing

* gitlab_module: fix typo in function name.

* gitlab_modules: unify return msg on check_mode

* gitlab_modules: don't use deprecated options in examples
2019-02-07 20:40:14 +01:00
..
cli Move the arguments module into cli/ and context_objects into utils 2019-01-03 18:12:23 -08:00
compat Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
config Fix encoding issues with file paths. (#50830) 2019-01-14 13:06:47 -08:00
contrib Fix vmware_inventory unit tests so they run. 2018-10-09 22:52:04 -07:00
errors Add better error when k=v syntax is used with YAML in tasks (#41754) 2018-12-04 12:32:02 -05:00
executor Handle exception raised in recursive_finder API (#49590) 2019-01-04 10:33:37 +05:30
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 2015-05-28 15:26:03 -05:00
mock Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
module_utils Initial commit for xenserver module_util unit tests (#50850) 2019-02-05 09:41:26 -08:00
modules Refactor gitlab modules (#51141) 2019-02-07 20:40:14 +01:00
parsing Fieldattribute inheritance with defaults (#50891) 2019-01-23 11:40:07 -06:00
playbook Move the arguments module into cli/ and context_objects into utils 2019-01-03 18:12:23 -08:00
plugins aws_ec2 Implement the missing 'region discovery' (#51333) 2019-01-29 14:59:38 -06:00
template templar: ensure that exceptions are handled, fix 'AttributeError' (#48792) 2018-11-29 09:56:23 -05:00
utils Move the arguments module into cli/ and context_objects into utils 2019-01-03 18:12:23 -08:00
vars move extravars and option vars loading into VM (#51070) 2019-01-30 16:25:36 -05:00
__init__.py Add empty-init code-smell script. (#18406) 2016-11-07 15:02:13 -08:00
ansible.cfg Fix ansible-test config management. 2017-10-04 12:52:36 -07:00
conftest.py Run unit tests in parallel. (#45812) 2018-09-18 13:58:22 -07:00
test_constants.py 1st part of ansible config, adds ansible-config to view/manage configs (#12797) 2017-06-14 11:08:34 -04:00
test_context.py Save the command line arguments into a global context 2019-01-03 18:12:23 -08:00