From 5a0da02e6cb139ab4e3f6279bf9ecab806f6e3e1 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Thu, 12 Nov 2020 20:47:28 -0800 Subject: [PATCH] code review changes, using when statements and adding trailing comma --- ansible_mitogen/planner.py | 2 +- .../integration/action/synchronize.yml | 26 +++++++++---------- .../paramiko_unblemished.yml | 14 +++++----- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ansible_mitogen/planner.py b/ansible_mitogen/planner.py index ab44d7e7..fc57f01b 100644 --- a/ansible_mitogen/planner.py +++ b/ansible_mitogen/planner.py @@ -487,7 +487,7 @@ def _propagate_deps(invocation, planner, context): # modules=planner.get_module_deps(), TODO overridden_sources=invocation._overridden_sources, # needs to be a list because can't unpickle() a set() - extra_sys_paths=list(invocation._extra_sys_paths) + extra_sys_paths=list(invocation._extra_sys_paths), ) diff --git a/tests/ansible/integration/action/synchronize.yml b/tests/ansible/integration/action/synchronize.yml index ab8ec4d0..31cfe553 100644 --- a/tests/ansible/integration/action/synchronize.yml +++ b/tests/ansible/integration/action/synchronize.yml @@ -45,22 +45,22 @@ # exception: AttributeError: 'get_with_context_result' object has no attribute '_shell' # TODO: looks like a bug on Ansible's end with 2.10? Maybe 2.10.1 will fix it # https://github.com/dw/mitogen/issues/746 - # - name: do synchronize test - # block: - # - synchronize: - # private_key: /tmp/synchronize-action-key - # dest: /tmp/sync-test.out - # src: /tmp/sync-test/ + - name: do synchronize test + block: + - synchronize: + private_key: /tmp/synchronize-action-key + dest: /tmp/sync-test.out + src: /tmp/sync-test/ - # - slurp: - # src: /tmp/sync-test.out/item - # register: out + - slurp: + src: /tmp/sync-test.out/item + register: out - # - set_fact: outout="{{out.content|b64decode}}" + - set_fact: outout="{{out.content|b64decode}}" - # - assert: - # that: outout == "item!" - # when: is_mitogen + - assert: + that: outout == "item!" + when: False # TODO: https://github.com/dw/mitogen/issues/692 # - file: diff --git a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml index 0228a160..a48bd3ca 100644 --- a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml +++ b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml @@ -1,16 +1,18 @@ # Ensure paramiko connections aren't grabbed. --- -# TODO: this is flaky -> https://github.com/dw/mitogen/issues/747 - name: integration/connection_loader/paramiko_unblemished.yml hosts: test-targets any_errors_fatal: true tasks: - debug: msg: "skipped for now" - # - custom_python_detect_environment: - # connection: paramiko - # register: out + - name: this is flaky -> https://github.com/dw/mitogen/issues/747 + block: + - custom_python_detect_environment: + connection: paramiko + register: out - # - assert: - # that: not out.mitogen_loaded + - assert: + that: not out.mitogen_loaded + when: False