-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some ansible warnings in test suite
- Loading branch information
Showing
3 changed files
with
35 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
--- | ||
- name: "{{ testname }} - Check if URL {{url}} returns without Header set to {{expected_header}}" | ||
|
||
- name: >- | ||
{{ testname }} - Check if URL {{url}} returns without Header set to | ||
{{expected_header}} | ||
uri: | ||
url: "{{ url }}" | ||
validate_certs: no | ||
HEADER_Host: "{{ host }}" | ||
register: result | ||
failed_when: result.{{expected_header}} is defined | ||
- name: "{{ testname }} - Check if URL {{url}} returns without Header set to {{expected_header}}" | ||
failed_when: result[expected_header] is defined | ||
|
||
- name: >- | ||
{{ testname }} - Check if URL {{url}} returns without Header set to | ||
{{expected_header}} | ||
debug: msg="Success!!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
--- | ||
- name: "{{ testname }} - Check if URL {{url}} returns with Header set to {{expected_header}} with value of '{{expected_header_value}}'" | ||
|
||
- name: >- | ||
{{testname}} - Check if URL {{url}} returns with Header set to | ||
{{expected_header}} with value of '{{expected_header_value}}' | ||
uri: | ||
url: "{{ url }}" | ||
validate_certs: no | ||
HEADER_Host: "{{ host }}" | ||
register: result | ||
until: result.{{expected_header}} is defined | ||
failed_when: result.{{expected_header}} != '{{expected_header_value}}' | ||
until: result[expected_header] is defined | ||
failed_when: result[expected_header] != expected_header_value | ||
retries: 20 | ||
delay: 10 | ||
- name: "{{ testname }} - Check if URL {{url}} returns with Header set to {{expected_header}} with value of '{{expected_header_value}}'" | ||
|
||
- name: >- | ||
{{testname}} - Check if URL {{url}} returns with Header set to | ||
{{expected_header}} with value of '{{expected_header_value}}' | ||
debug: msg="Success!!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
- name: "{{ testname }} - make sure repo folder {{git_repo_name}} exists" | ||
file: | ||
path: /{{git_repo_name}} | ||
state: directory | ||
|
||
- name: "{{ testname }} - cleaning repo folder {{git_repo_name}}" | ||
command: rm -rf {{git_repo_name}} | ||
args: | ||
chdir: / | ||
--- | ||
|
||
- name: "{{ testname }} - make sure repo folder {{git_repo_name}} exists" | ||
- name: "{{ testname }} - ensure empty repo folder /{{git_repo_name}} exists" | ||
file: | ||
state: "{{ item }}" | ||
path: /{{git_repo_name}} | ||
state: directory | ||
|
||
- name: "{{ testname }} - init fresh git repo in {{git_repo_name}}" | ||
command: git init | ||
args: | ||
chdir: /{{git_repo_name}} | ||
loop: | ||
- absent | ||
- directory | ||
|
||
- name: "{{ testname }} - add remote {{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} to git repo in {{git_repo_name}}" | ||
command: git remote add origin {{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} | ||
- name: >- | ||
{{ testname }} - init and add remote | ||
{{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} to git repo in | ||
{{git_repo_name}} | ||
command: "{{ item }}" | ||
args: | ||
chdir: /{{git_repo_name}} | ||
loop: | ||
- git init | ||
- >- | ||
git remote add origin | ||
{{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} |