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

Add support for SetHandler directive #604

Merged
merged 2 commits into from
Apr 2, 2014
Merged

Conversation

bodgit
Copy link
Contributor

@bodgit bodgit commented Feb 3, 2014

This PR adds support for the SetHandler directive for directories/files/locations. I needed to be able to selectively disable a handler for certain locations, like so:

<Location "/content/">
  SetHandler None
</Location>

etc.

@blkperl
Copy link
Contributor

blkperl commented Feb 4, 2014

Can you add some spec tests?

@bodgit
Copy link
Contributor Author

bodgit commented Feb 4, 2014

I've added a test but running the suite is made difficult by Vagrant failing to run, possibly because I'm using Fusion instead of Virtualbox, although I do have the custom provider installed. I get:

$ bundle exec rspec spec/acceptance
Hypervisor for centos-64-x64 is vagrant
Beaker::Hypervisor, found some vagrant boxes to create
/opt/local/lib/ruby1.9/gems/1.9.1/gems/beaker-1.6.2/lib/beaker/hypervisor/vagrant.rb:164:in `block (2 levels) in vagrant_cmd': Failed to exec 'vagrant destroy --force' (RuntimeError)
    from /opt/local/lib/ruby1.9/1.9.1/open3.rb:208:in `popen_run'
    from /opt/local/lib/ruby1.9/1.9.1/open3.rb:90:in `popen3'
    from /opt/local/lib/ruby1.9/gems/1.9.1/gems/beaker-1.6.2/lib/beaker/hypervisor/vagrant.rb:159:in `block in vagrant_cmd'
…

If I cd to where the Vagrantfile is I can customise and override it with enough Fusion-fu that I can manually do vagrant up --provider=vmware_fusion and I get a VM but I can't get the tests to run.

@bodgit
Copy link
Contributor Author

bodgit commented Feb 4, 2014

I had to manually edit spec/acceptance/nodesets/centos-64-x64.yml to specify a Fusion-compatible .box file and then setting VAGRANT_DEFAULT_PROVIDER=vmware_fusion before running the tests gets me a working VM.

However, the test suite fails if Vagrant can't first destroy a VM called centos-64-x64 so I have to manually create the VM from the Vagrantfile, then run the tests which promptly destroys it and then recreates it. The code doesn't handle the case where the VM does not yet exist, (because this is the first time I've ran the tests).

After all that, I got zero failures.

@igalic
Copy link
Contributor

igalic commented Feb 5, 2014

@bodgit that seems like a bit of an usability issue with beaker which we should really work out with the team.

@bodgit
Copy link
Contributor Author

bodgit commented Feb 5, 2014

@igalic sure, it looked like something deep within the beaker gem rather than this module, I suspect I'm in a minority using Vagrant with VMware so it's probably a less trodden path.

Anyway, the travis CI has had better luck at running the tests :-)

@igalic
Copy link
Contributor

igalic commented Feb 6, 2014

Yeah... because it's not running them :( (yet… Eventually, we'll move this over to Jenkins)

Btw, I've seen this specific error "fixed" in beaker already: voxpupuli/beaker#145 already, but it's not merged yet.

@bodgit
Copy link
Contributor Author

bodgit commented Feb 12, 2014

Rebased with acceptance tests, ok?

@bodgit
Copy link
Contributor Author

bodgit commented Mar 24, 2014

Bueller?

@igalic
Copy link
Contributor

igalic commented Mar 24, 2014

@bodgit I'm very sorry this got lost :(
Could you please rebase again?

@bodgit
Copy link
Contributor Author

bodgit commented Mar 25, 2014

Done, bundle exec rspec spec/acceptance passes.

@igalic
Copy link
Contributor

igalic commented Mar 25, 2014

The travis failure is due to travis, we have a fix for this in puppet-gitlab: sbadia/puppet-gitlab#135

@apenney
Copy link
Contributor

apenney commented Mar 27, 2014

Can we get you to give this a quick rebase on master for us, just so we can be sure the travis checks pass?

@bodgit
Copy link
Contributor Author

bodgit commented Apr 2, 2014

Sorry, completely forgot to do this. Rebased now.

igalic added a commit that referenced this pull request Apr 2, 2014
Add support for SetHandler directive
@igalic igalic merged commit 8f0da04 into puppetlabs:master Apr 2, 2014
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants