Debian Codegraph @

ansible_collections/community/aws/tests/integration/targets/codebuild_project/tasks/description.yml

raw
1 - name: Tests relating to setting description on aws_codebuild
2 vars:
3 description_one: 'a Description - {{ resource_prefix }}'
4 description_two: 'Another_Description - {{ resource_prefix }}'
5 # Mandatory settings
6 module_defaults:
7 community.aws.codebuild_project:
8 name: '{{ project_name }}'
9 # community.aws.aws_codebuild_info:
10 # name: '{{ project_name }}'
11 block:
12
13 # - name: test setting description aws_codebuild (check mode)
14 # codebuild_project:
15 # description: '{{ description_one }}'
16 # register: update_result
17 # check_mode: yes
18 # - name: assert that update succeeded
19 # assert:
20 # that:
21 # - update_result is changed
22
23 - name: test setting description aws_codebuild
24 codebuild_project:
25 description: '{{ description_one }}'
26 register: update_result
27 - name: assert that update succeeded
28 assert:
29 that:
30 - update_result is changed
31 - update_result.project.description == description_one
32
33 # - name: test setting description aws_codebuild - idempotency (check mode)
34 # codebuild_project:
35 # description: '{{ description_one }}'
36 # register: update_result
37 # check_mode: yes
38 # - name: assert that update succeeded
39 # assert:
40 # that:
41 # - update_result is not changed
42
43 - name: test setting description aws_codebuild - idempotency
44 codebuild_project:
45 description: '{{ description_one }}'
46 register: update_result
47 - name: assert that update succeeded
48 assert:
49 that:
50 - update_result is not changed
51 - update_result.project.description == description_one
52
53 ###
54
55 # - name: test updating description on aws_codebuild (check mode)
56 # codebuild_project:
57 # description: '{{ description_two }}'
58 # register: update_result
59 # check_mode: yes
60 # - name: assert that update succeeded
61 # assert:
62 # that:
63 # - update_result is changed
64
65 - name: test updating description on aws_codebuild
66 codebuild_project:
67 description: '{{ description_two }}'
68 register: update_result
69 - name: assert that update succeeded
70 assert:
71 that:
72 - update_result is changed
73 - update_result.project.description == description_two
74
75 # - name: test updating description on aws_codebuild - idempotency (check mode)
76 # codebuild_project:
77 # description: '{{ description_two }}'
78 # register: update_result
79 # check_mode: yes
80 # - name: assert that update succeeded
81 # assert:
82 # that:
83 # - update_result is not changed
84
85 - name: test updating description on aws_codebuild - idempotency
86 codebuild_project:
87 description: '{{ description_two }}'
88 register: update_result
89 - name: assert that update succeeded
90 assert:
91 that:
92 - update_result is not changed
93 - update_result.project.description == description_two
94
95 # ###
96 #
97 # - name: test that aws_codebuild_info returns the description
98 # aws_codebuild_info:
99 # register: tag_info
100 # - name: assert description present
101 # assert:
102 # that:
103 # - tag_info.project.description == description_two
104 #
105 # ###
106
107 # - name: test no description param aws_codebuild (check mode)
108 # codebuild_project: {}
109 # register: update_result
110 # check_mode: yes
111 # - name: assert no change
112 # assert:
113 # that:
114 # - update_result is not changed
115 # - update_result.project.description == description_two
116
117
118 - name: test no description param aws_codebuild
119 codebuild_project: {}
120 register: update_result
121 - name: assert no change
122 assert:
123 that:
124 - update_result is not changed
125 - update_result.project.description == description_two