Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge remote-tracking branch 'origin/dmw'
- Context serialization fix - #370: functioning reboot module.
- Loading branch information
Showing
6 changed files
with
125 additions
and
27 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
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
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
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,2 +1,3 @@ | ||
- import_playbook: disconnect_cleanup.yml | ||
- import_playbook: lru_one_target.yml | ||
- import_playbook: reconnection.yml |
46 changes: 46 additions & 0 deletions
46
tests/ansible/integration/context_service/disconnect_cleanup.yml
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# issue #76, #370: ensure context state is forgotten on disconnect, including | ||
# state of dependent contexts (e.g. sudo, connection delegation, ..). | ||
|
||
- name: integration/context_service/disconnect_cleanup.yml | ||
hosts: test-targets | ||
any_errors_fatal: true | ||
tasks: | ||
- meta: end_play | ||
when: not is_mitogen | ||
|
||
# Start with a clean slate. | ||
- mitogen_shutdown_all: | ||
|
||
# Connect a few users. | ||
- shell: "true" | ||
become: true | ||
become_user: "mitogen__user{{item}}" | ||
with_items: [1, 2, 3] | ||
|
||
# Verify current state. | ||
- mitogen_action_script: | ||
script: | | ||
self._connection._connect() | ||
result['dump'] = self._connection.parent.call_service( | ||
service_name='ansible_mitogen.services.ContextService', | ||
method_name='dump' | ||
) | ||
register: out | ||
|
||
- assert: | ||
that: out.dump|length == 4 # ssh account + 3 sudo accounts | ||
|
||
- meta: reset_connection | ||
|
||
# Verify current state. | ||
- mitogen_action_script: | ||
script: | | ||
self._connection._connect() | ||
result['dump'] = self._connection.parent.call_service( | ||
service_name='ansible_mitogen.services.ContextService', | ||
method_name='dump' | ||
) | ||
register: out | ||
|
||
- assert: | ||
that: out.dump|length == 1 # just the ssh account |
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