Skip to content

Commit

Permalink
Fix docker_container tty test. (#444) (#445)
Browse files Browse the repository at this point in the history
(cherry picked from commit bd62f82)

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
patchback[bot] and felixfontein authored Aug 11, 2022
1 parent b556281 commit 403b4f4
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3940,6 +3940,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
tty: yes
state: started
register: tty_1
ignore_errors: true

- name: tty (idempotency)
docker_container:
Expand All @@ -3949,6 +3950,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
tty: yes
state: started
register: tty_2
ignore_errors: true

- name: tty (change)
docker_container:
Expand All @@ -3959,6 +3961,7 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
state: started
force_kill: yes
register: tty_3
ignore_errors: true

- name: cleanup
docker_container:
Expand All @@ -3970,8 +3973,15 @@ avoid such warnings, please quote the value.' in log_options_2.warnings"
- assert:
that:
- tty_1 is changed
- tty_2 is not changed
- tty_2 is not changed and tty_2 is not failed
- tty_3 is changed
when: tty_1 is not failed

- assert:
that:
- "'error during container init: open /dev/pts/' in tty_1.msg"
- "': operation not permitted: ' in tty_1.msg"
when: tty_1 is failed

####################################################################
## ulimits #########################################################
Expand Down

0 comments on commit 403b4f4

Please sign in to comment.