Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again whitespaces #141

Closed
rokka-n opened this issue Mar 27, 2016 · 3 comments
Closed

Again whitespaces #141

rokka-n opened this issue Mar 27, 2016 · 3 comments

Comments

@rokka-n
Copy link

rokka-n commented Mar 27, 2016

Hi,

This is from readme example, run on a macbook, molecule version is 1.3.0

$ molecule init foo
$ cd foo
$ molecule test

==> foo-01: Setting hostname...
==> foo-01: Configuring and enabling network interfaces...
==> foo-01: Mounting shared folders...
    foo-01: /vagrant => /Users/rn/devops/molecule/foo
==> foo-01: Machine not provisioned because `--no-provision` is specified.

PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [foo-01]

PLAY RECAP *********************************************************************
foo-01                     : ok=1    changed=0    unreachable=0    failed=0

Idempotence test in progress (can take a few minutes)...
Idempotence test passed.
Trailing whitespace found in ./meta/main.yml on lines: 3, 5, 9, 18, 28, 158

If these whitespaces removed, I still don't see serverspec tests running:

molecule verify
============================= test session starts ==============================
platform darwin -- Python 2.7.10, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: /Users/rn/devops/molecule/foo, inifile:
plugins: testinfra-1.0.3
collected 0 items

========================= no tests ran in 0.01 seconds =========================
ERROR:

  RAN: '/Users/rn/virtenv/foobar/bin/testinfra --connection=ansible --sudo --ansible-inventory=.molecule/ansible_inventory'

  STDOUT:

  STDERR:
@identifystation
Copy link
Contributor

@rokka-n Do you have the same behavior with 1.4.1? I know your comment on another issue said you did, but I'm unable to reproduce it.

▶ molecule init foo
Successfully initialized new role in ./foo

▶ cd foo

▶ molecule test
Bringing machine 'foo-01' up with 'virtualbox' provider...
==> foo-01: Importing base box 'trusty64'...
==> foo-01: Matching MAC address for NAT networking...
...

PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************
ok: [foo-01]

PLAY RECAP ********************************************************************
foo-01                     : ok=1    changed=0    unreachable=0    failed=0

Idempotence test in progress (can take a few minutes)...
Idempotence test passed.

No testinfra tests found in tests/.

Executing rubocop on *.rb files found in spec/.
Inspecting 2 files
..

2 files inspected, no offenses detected

Executing serverspec tests found in spec/.
*** Run serverspec on foo-01 instance ***
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -I/Library/Ruby/Gems/2.0.0/gems/rspec-support-3.3.0/lib:/Library/Ruby/Gems/2.0.0/gems/rspec-core-3.3.2/lib /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.3.2/exe/rspec --pattern spec/\*_spec.rb,spec/foo-01/\*_spec.rb,spec/hosts/foo-01/\*_spec.rb,spec/group_1/\*_spec.rb,spec/groups/group_1/\*_spec.rb,spec/group_2/\*_spec.rb,spec/groups/group_2/\*_spec.rb

File "/etc/hosts"
  should be a file
  should be owned by "root"
  should be grouped into "root"

Finished in 0.35853 seconds (files took 0.39658 seconds to load)
3 examples, 0 failures


==> foo-01: Forcing shutdown of VM...
==> foo-01: Destroying VM and associated drives...


▶ molecule --version
1.4.1

▶ uname -a
Darwin splashdown.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

@rokka-n
Copy link
Author

rokka-n commented Apr 4, 2016

That's correct, just upgraded in venv to 1.4.1 and now init subcommand generates setup without any warnings and all tests are passing.

However, if whitespace is added accidentally:

Trailing whitespace found in ./defaults/main.yml on lines: 2

It looks like a warning, it doesn't stop the test.
It would be nice to have this as an optional feature, and by default just ignore whitespaces.

@retr0h
Copy link
Contributor

retr0h commented Apr 4, 2016

It would be nice to have this as an optional feature, and by default just ignore whitespaces.

@rokka-n not going to happen.

@retr0h retr0h closed this as completed Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants