voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

How to only run onceover tests but not other rspec tests? #261

Closed neomilium closed 4 years ago

neomilium commented 4 years ago

Hi,

I use onceover to test roles against factsets and I'm really happy with this feature.

On other side, I have unit tests on some specific code. These tests run perfectly using bundle exec rspec but not using bundle exec onceover run spec due to different configuration (ie. in my case we use mocha to mock objects but it does make sense to split these tasks in CI too).

Is it possible to disable to rspec run on regular tests from onceover ones?

If not, could you give some hints to contribute this feature?

Thanks a lot for your help and this useful software.

neomilium commented 4 years ago

I find how to have the expected behavior by removing one line in lib/onceover/runner.rb:

FileUtils.cp_r("#{@repo.spec_dir}", "#{@repo.tempdir}")

@dylanratcliffe What feature you want to provide by coping this directory?

neomilium commented 4 years ago

Solution found and PR provided, see #262.