mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation. After module has reached the end of it's deprecation cycle we will replace it with a docs stub. * Replace deprecated modules with docs-only sub * Use of deprecated past deprecation cycle gives meaningful message (see examples below) * Enforce documentation.deprecation dict via `schema.py` * Update `ansible-doc` and web docs to display documentation.deprecation * Document that structure in `dev_guide` * Ensure that all modules starting with `_` have a `deprecation:` block * Ensure `deprecation:` block is only used on modules that start with `_` * `removed_in` A string which represents when this module needs **deleting** * CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives * CHANGELOG.md links to porting guide index To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain: ```python if __name__ == '__main__': removed_module() ```
This commit is contained in:
parent
7c83f006c0
commit
a23c95023b
66 changed files with 241 additions and 4438 deletions
|
@ -1,20 +0,0 @@
|
|||
import collections
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from ansible.modules.cloud.docker._docker import get_split_image_tag
|
||||
|
||||
|
||||
class DockerSplitImageTagTestCase(unittest.TestCase):
|
||||
|
||||
def test_trivial(self):
|
||||
self.assertEqual(get_split_image_tag('test'), ('test', 'latest'))
|
||||
|
||||
def test_with_org_name(self):
|
||||
self.assertEqual(get_split_image_tag('ansible/centos7-ansible'), ('ansible/centos7-ansible', 'latest'))
|
||||
|
||||
def test_with_tag(self):
|
||||
self.assertEqual(get_split_image_tag('test:devel'), ('test', 'devel'))
|
||||
|
||||
def test_with_tag_and_org_name(self):
|
||||
self.assertEqual(get_split_image_tag('ansible/centos7-ansible:devel'), ('ansible/centos7-ansible', 'devel'))
|
Loading…
Add table
Add a link
Reference in a new issue