diff --git a/tests/doas_test.py b/tests/doas_test.py index 43284367..560ada99 100644 --- a/tests/doas_test.py +++ b/tests/doas_test.py @@ -1,5 +1,4 @@ -import getpass import os import mitogen @@ -59,7 +58,7 @@ class DoasTest(testlib.DockerMixin, testlib.TestCase): password='has_sudo_password', ) context = self.router.su(via=ssh, password='rootpassword') - self.assertEquals('root', context.call(getpass.getuser)) + self.assertEquals(0, context.call(os.getuid)) if __name__ == '__main__': diff --git a/tests/image_prep/README.md b/tests/image_prep/README.md index d275672f..a970b319 100644 --- a/tests/image_prep/README.md +++ b/tests/image_prep/README.md @@ -11,10 +11,13 @@ code, the OS X config just has the user accounts. See ../README.md for a (mostly) description of the accounts created. + ## Building the containers ``./build_docker_images.sh`` +Requires Ansible 2.3.x.x in order to target CentOS 5 + ## Preparing an OS X box diff --git a/tests/image_prep/_container_setup.yml b/tests/image_prep/_container_setup.yml index 9662d498..9d001f48 100644 --- a/tests/image_prep/_container_setup.yml +++ b/tests/image_prep/_container_setup.yml @@ -87,27 +87,24 @@ shell: locale-gen when: distro == "Debian" - - name: Install prebuilt 'doas' binary on Debian + - name: Install prebuilt 'doas' binary unarchive: dest: / src: ../data/docker/doas-debian.tar.gz - when: distro == "Debian" - - name: Make prebuilt 'doas' binary executable on Debian + - name: Make prebuilt 'doas' binary executable file: path: /usr/local/bin/doas mode: 'u=rwxs,go=rx' owner: root group: root - when: distro == "Debian" - - name: Install doas.conf on Debian + - name: Install doas.conf copy: dest: /etc/doas.conf content: | permit :mitogen__group permit :root - when: distro == "Debian" - name: Vanilla Ansible needs simplejson on CentOS 5. shell: mkdir -p /usr/lib/python2.4/site-packages/simplejson/