azavea / ansible-java

An Ansible role for installing Java.
Apache License 2.0
4 stars 15 forks source link

WIP: Replace Vagrant test setup with Molecule #18

Closed tnation14 closed 8 years ago

tnation14 commented 8 years ago

Replacing the existing Vagrant test setup with Molecule, which still supports Vagrant/Ansible but also allows testing using the Testinfra framework, and also makes it easier to test multiple platforms (i.e. Ubuntu 14.04 and Ubuntu 16.04).

http://molecule.readthedocs.org/

hectcastro commented 8 years ago

I'm having a hard time testing the Xenial platform. How were you able to test the role with Trusty and Xenial?

tnation14 commented 8 years ago

I did $ molecule test --platform xenial64 and $ molecule test --platform trusty64, corresponding to platform names given in molecule.yml.

hectcastro commented 8 years ago

I was trying that as well, but it looks like Molecule isn't respecting the --platform argument:

❯ molecule test --platform xenial64                                                                                                                                               

playbook: playbook.yml
Bringing machine 'ansible-java' up with 'virtualbox' provider...
==> ansible-java: Preparing master VM for linked clones...
    ansible-java: This is a one time operation. Once the master VM is prepared,
    ansible-java: it will be used as a base for linked clones, making the creation
    ansible-java: of new VMs take milliseconds on a modern system.
==> ansible-java: Importing base box 'ubuntu/trusty64'...

Note that I asked for xenial64, but it is importing the ubuntu/trusty64 base box. Looks like this may be an active Molecule issue https://github.com/metacloud/molecule/issues/199.

hectcastro commented 8 years ago

Looks good! 👍

Also worth noting that this will end up resolving https://github.com/azavea/ansible-java/issues/17.