mitogen/tests/ansible/integration/stub_connections
David Wilson ad5a80f200 Use virtualenv Python for stub connections to workaround problem
../data/stubs/stub-kubectl.py exec -it localhost -- /usr/bin/python -c "...":

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    LookupError: unknown encoding: base64

It's not clear why this is happening. "stub-kubectl.py" is executed with
the 2.7 virtualenv, while the exec() that happens inside stub-kubectl
was for "/usr/bin/python".

That second Python can't find chunks of its stdlib:

    stat("/usr/lib/python2.7/encodings/base64", 0x7ffde8744c60) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.py", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/python2.7/encodings/base64.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
    write(2, "Traceback (most recent call last):\n", 35) = 35
    write(2, "  File \"<string>\", line 1, in <module>\n", 39) = 39
2019-06-04 13:37:00 +01:00
..
README.md issue #409: add new stub_connections/ test type. 2018-10-31 00:47:47 +00:00
_end_play_if_not_sudo_linux.yml issue #409: add stub LXC test, refactor playbooks. 2018-10-31 12:12:17 +00:00
all.yml issue #477: tests: use Ansible 2.3-compatible include rather than import 2019-01-24 04:17:07 +00:00
kubectl.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
lxc.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
lxd.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
mitogen_doas.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
mitogen_sudo.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
setns_lxc.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00
setns_lxd.yml Use virtualenv Python for stub connections to workaround problem 2019-06-04 13:37:00 +01:00

README.md

stub_connections/

The playbooks in this directory use stub implementations of various third party tools (kubectl etc.) to verify arguments passed by Ansible to Mitogen and subsequently onward to the tool result in something that looks sane.

These are bare minimum tests just to ensure sporadically tested connection methods haven't broken in embarrasingly obvious ways.