Skip to content

Commit

Permalink
stop testing jessie, test tweaks to make sure no newline will hurt us…
Browse files Browse the repository at this point in the history
…, yamlint foldouts
  • Loading branch information
grzegorznowak committed May 28, 2019
1 parent f83d15e commit a12f970
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
__pycahce__
*.pyc
pytestdebug.log
devenv
3 changes: 3 additions & 0 deletions .yamllint
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends: default

ignore: |
devenv

rules:
braces:
max-spaces-inside: 1
Expand Down
9 changes: 8 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

1 change: 0 additions & 1 deletion meta/main.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ galaxy_info:
- bionic
- name: Debian
versions:
- jessie
- stretch
- buster
- name: EL
Expand Down
2 changes: 0 additions & 2 deletions molecule/default/molecule.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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'

0 comments on commit a12f970

Please sign in to comment.