From a12f970129812e041a41ea36bcd8fcb2974b42f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Nowak Date: Tue, 28 May 2019 14:46:11 +0200 Subject: [PATCH] stop testing jessie, test tweaks to make sure no newline will hurt us, yamlint foldouts --- .gitignore | 1 + .yamllint | 3 +++ README.md | 9 ++++++++- handlers/main.yml | 3 +-- meta/main.yml | 1 - molecule/default/molecule.yml | 2 -- molecule/default/tests/test_default.py | 10 +++++----- 7 files changed, 18 insertions(+), 11 deletions(-) mode change 100644 => 100755 .yamllint mode change 100644 => 100755 README.md mode change 100644 => 100755 meta/main.yml mode change 100644 => 100755 molecule/default/molecule.yml diff --git a/.gitignore b/.gitignore index c4fb3d4..7af155d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycahce__ *.pyc pytestdebug.log +devenv diff --git a/.yamllint b/.yamllint old mode 100644 new mode 100755 index 69a3994..3897d68 --- a/.yamllint +++ b/.yamllint @@ -1,5 +1,8 @@ extends: default +ignore: | + devenv + rules: braces: max-spaces-inside: 1 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 54ec059..3206918 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ No dependencies, just note it will install `wget` to fetch the nvm installation Currently builds and integrates on those distros: ##### Ubuntu: 18.04, 16.04, 14.04 -##### Debian: buster, stretch, jessie +##### Debian: buster, stretch ##### CentOS: 7 @@ -87,6 +87,13 @@ and that will install global gulp and put a symlink to global $PATH for specific * https://molecule.readthedocs.io/en/latest/installation.html * [specific molecule LXD install doc](molecule/default/INSTALL.rst) +as of now (28.05.2019), package versions of `molecule` and `testinfra` are incompatible +but it's still posible to use them as long as you install `testinfra` first, like: + + pip install testinfra molecule + +if you do it the other way around you might be getting runtime errors from python +on the testing phase ### Testing with lxc containers diff --git a/handlers/main.yml b/handlers/main.yml index 88eb6e2..67dca56 100755 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -4,6 +4,5 @@ command: "{{ nvm_dir }}/install_nvm_{{ nvm_node_version }}.script" - name: Install new global packages - shell : ". /root/.bashrc && {{ nvm_dir }}/versions/node/v{{ nvm_node_version }}/bin/npm install --global {{item}}" + shell: ". /root/.bashrc && {{ nvm_dir }}/versions/node/v{{ nvm_node_version }}/bin/npm install --global {{ item }}" loop: "{{ nvm_install_globally }}" - diff --git a/meta/main.yml b/meta/main.yml old mode 100644 new mode 100755 index 397e49d..d8ac482 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,7 +15,6 @@ galaxy_info: - bionic - name: Debian versions: - - jessie - stretch - buster - name: EL diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml old mode 100644 new mode 100755 index d0f44b4..8d84ec0 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -16,8 +16,6 @@ platforms: image: debian/buster/amd64 - name: ansible-role-node-test-instance-stretch image: debian/stretch/amd64 - - name: ansible-role-node-test-instance-jessie - image: debian/jessie/amd64 provisioner: name: ansible lint: diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py index ecd52d8..a3da033 100755 --- a/molecule/default/tests/test_default.py +++ b/molecule/default/tests/test_default.py @@ -10,7 +10,7 @@ def test_node_version_ok(host): cmd = host.run("node -v") assert cmd.stderr == '' - assert cmd.stdout == 'v8.11.3' + assert cmd.stdout.rstrip() == 'v8.11.3' def test_global_gulp_version_ok(host): @@ -20,23 +20,23 @@ def test_global_gulp_version_ok(host): cmd = host.run("sudo -u www-data which gulp") assert cmd.stderr == '' - assert cmd.stdout == '/usr/bin/gulp' + assert cmd.stdout.rstrip() == '/usr/bin/gulp' def test_npm_ok(host): cmd = host.run("npm -v") - assert cmd.stdout == '5.6.0' + assert cmd.stdout.rstrip() == '5.6.0' def test_user_npm_ok(host): with host.sudo("nvm_tester"): host.check_output("whoami") cmd = host.run("npm -v") - assert cmd.stdout == '5.6.0' + assert cmd.stdout.rstrip() == '5.6.0' def test_user_node_version_ok(host): with host.sudo("nvm_tester"): cmd = host.run("node -v") assert cmd.stderr == '' - assert cmd.stdout == 'v8.11.3' + assert cmd.stdout.rstrip() == 'v8.11.3'