Commit Graph

59 Commits (68591860690241b657757a4e31117fc39c8aef1d)

Author SHA1 Message Date
David Wilson b59a47aecb tests: make mitogen_shutdown_all be run_once by default. 6 years ago
David Wilson abb0319bbb issue #477: get rid of perl JSON module requirement. 6 years ago
David Wilson 2f087859bc issue #477: 2.4-compatible syntax. 6 years ago
David Wilson 532ae92029 issue #477: Ansible 2.3 requires placeholder module for assert_equals 6 years ago
David Wilson 0b0ae5c971 issue #477: backport various test modules to Python 2.4. 6 years ago
David Wilson 462a8567e5 issue #477: add all() polyfill to custom_python_detect_environmnet 6 years ago
David Wilson be8562ce09 issue #477: Ansible 2.3 had stricter arg spec format. 6 years ago
David Wilson 66b64cae2c issue #477: older Ansibles had no vars plugin base class. 6 years ago
David Wilson 23866084d7 issue #412: promote "mitogen_get_stack" to the main extension.
This is to make it easier for users to diagnose their own problems.
6 years ago
David Wilson d72567b15b tests: make assert_equal work on newer Ansibles. 6 years ago
David Wilson 4256d2aa4b tests: make fork_histogram optional 6 years ago
David Wilson 91c9aff9ff tests: import assert_equal action. 6 years ago
David Wilson 8380baf41b issue #461: Ansible 2.3 placeholder modules for action plug-ins. 6 years ago
David Wilson a8921bb6ff tests: fix scaling in fork_histogram 6 years ago
David Wilson 6936b93b43 tests: import fork_histogram.py. 6 years ago
David Wilson a6e6bc4c71 issue #426: to_text filter. 6 years ago
David Wilson 89852db163 issue #370: add 'disconnect resets connection' test 6 years ago
David Wilson dfb4930fce tests: import custom binaries for tests
It means Linux<->OS X runs work fine without manual hackery.
6 years ago
David Wilson 65f03e03f5 tests: remote_tmp test fixes. 6 years ago
David Wilson 5eb41751f5 tests: import missing connection_passthrough 6 years ago
David Wilson b0ffc4e209 Copy random test setup changes out of linear2 branch. 6 years ago
David Wilson 5bac246676 tests: make nice_stdout print failing task line number 6 years ago
David Wilson 3b012e5bce tests: allow plugging in pprint/pprintpp via env. 6 years ago
David Wilson f24f02ba06 issue #321: take remote_tmp and system_tmpdirs into account.
Can't simply ignore these settings as some users may have weird noexec
filesystems.
6 years ago
David Wilson a2686b1a2c issue #321: simplify temp directory handling. 6 years ago
David Wilson 916e46621b issue #340: add connection delegation tests. 6 years ago
David Wilson aed8fb531b tests: unused imports 6 years ago
David Wilson e39c602fd3 issue #291: support UNIX hashbang syntax for ansible_*_interpreter.
Closes #291.
6 years ago
David Wilson 15d68b3c32 issue #309: fix environment cleanup regression.
Closes #309.
6 years ago
David Wilson d8e0c9e12c issue #297: local commands must execute with WorkerProcess environment. 6 years ago
David Wilson b21d51be47 ansible: fix test for 3.x. 6 years ago
David Wilson 410016ff47 Initial Python 3.x port work.
* ansible: use unicode_literals everywhere since it only needs to be
  compatible back to 2.6.
* compat/collections.py: delete this entirely and rip out the parts of
  functools that require it.
* Introduce serializable Kwargs dict subclass that translates keys to
  Unicode on instantiation.
* enable_debug_logging() must set _v/_vv globals.
* cStringIO does not exist in 3.x.
* Treat IOLogger and LogForwarder input as latin-1.
* Avoid ResourceWarnings in first stage by explicitly closing fps.
* Fix preamble_size.py syntax errors.
6 years ago
David Wilson 4f57c59b7e issue #275: Don't run virtualnv test on 2.6. 6 years ago
David Wilson fbb67e837e tests: import nice_stdout plugin 7 years ago
David Wilson 3b0addcfb0 service: v2. Closes #213 7 years ago
David Wilson eac4cc7afe tests: speed things up 7 years ago
David Wilson a99c7a12f9 tests: output split groups in gcloud.py 7 years ago
David Wilson dbcee4041a tests: refactor gcloud.py to be dynamic inventory. 7 years ago
David Wilson 2ad0d0521d ansible: reload /etc/resolv.conf for each task.
The OpenShift installer modifies /etc/resolv.conf then tests the new
resolver configuration, however, there was no mechanism to reload
resolv.conf in our reuseable interpreter.

https://github.com/openshift/openshift-ansible/blob/release-3.9/roles/openshift_web_console/tasks/install.yml#L137

This inserts an explicit call to res_init() for every new style
invocation, with an approximate cost of ~1usec on Linux since glibc
verifies resolv.conf has changed before reloading it.

There is little to be done for users of the thread-safe resolver APIs,
their state is hidden from us. If bugs like that manifest, whack-a-mole
style 'del sys.modules[thatmod]' patches may suffice.
7 years ago
David Wilson 267f787d20 issue #217: tests: import (unused) module_utils tests. 7 years ago
David Wilson 69f58875c8 tests: more ansible fixes from recent brakage. 7 years ago
David Wilson f98279fc95 tests: fix LRU test after splitting up Connection class.
The module the connection class is now loaded as is
"ansible.plugins.connection.mitogen_ssh", etc., which breaks the test.
Instead, check if the connection is an instance of the base Connection
class.
7 years ago
David Wilson f9e1905ec6 issue #199: ansible: stop writing temp files for new style modules
While adding support for non-new style module types, NewStyleRunner
began writing modules to a temporary file, and sys.argv was patched to
actually include the script filename. The argv change was never required
to fix any particular bug, and a search of the standard modules reveals
no argv users. Update argv[0] to be '', like an interactive interpreter
would have.

While fixing #210, new style runner began setting __file__ to the
temporary file path in order to allow apt.py to discover the Ansiballz
temporary directory. 5 out of 1,516 standard modules follow this
pattern, but in each case, none actually attempt to access __file__,
they just call dirname on it. Therefore do not write the contents of
file, simply set it to the path as it would exist, within a real
temporary directory.

Finally move temporary directory creation out of runner and into target.
Now a single directory exists for the duration of a run, and is emptied
by runner.py as necessary after each task invocation.

This could be further extended to stop rewriting non-new-style modules
in a with_items loop, but that's another step.

Finally the last bullet point in the documentation almost isn't a lie
again.
7 years ago
David Wilson 86c9978e09 Ensure mod.__file__ is set; closes #210. 7 years ago
David Wilson 8c3b1fcf15 ansible: disable script interpreter processing for new-style
Re: #199
7 years ago
David Wilson 2f02b5c0b1 ansible: prevent Unicode strings leaking into sys.argv
The module name comes from YAML via Jinja2.. it's always Unicode. Mixing
it into a temporary directory name produces a Unicode tempdir name,
which ends up in sys.argv via TemporaryArgv.
7 years ago
David Wilson e7831a801f issue #195: handle non-ASCII scripts in runner.py. 7 years ago
David Wilson fca22efe90 tests: enable profile_tasks callback plugin 7 years ago
David Wilson d827bdb848 tests: fixes to get regression/ running under vanilla Ansible 7 years ago
David Wilson b882b78d35 tests: clean up remaining reg tests
Delete some that are impossible to detect, fix up the remainder to
detect the condition they describe.
7 years ago