feat: add example of test plugin (for collection)
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
def is_blue(string):
|
||||
blue_values = [
|
||||
'blue',
|
||||
'#0000ff',
|
||||
'#00f',
|
||||
'rgb(0,0,255)',
|
||||
'rgb(0%,0%,100%)',
|
||||
]
|
||||
if string in blue_values:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
class TestModule(object):
|
||||
''' Ansible core blue test '''
|
||||
def tests(self):
|
||||
return {'blue': is_blue}
|
@ -3,3 +3,6 @@
|
||||
- name: Debug test
|
||||
ansible.builtin.debug:
|
||||
msg: "Un role test !!!"
|
||||
- name: "Verify {{ my_color_choice }} is a form of blue."
|
||||
ansible.builtin.assert:
|
||||
that: my_color_choice is coll.test.blue
|
Reference in New Issue
Block a user