scalefactory / vagrant-cucumber

A Vagrant plugin to allow cucumber to work with VMs.
MIT License
40 stars 8 forks source link

Vagrant Docker provider support? #8

Open eterps opened 10 years ago

eterps commented 10 years ago

Tried using Docker as a vagrant provider. It breaks on:

    Given there is a running VM called "vm1"                         # vagrant-cucumber-0.0.8/lib/vagrant-cucumber/step_definitions.rb:3
      Rolling back VM states
      undefined method `has_snapshot?' for #<VagrantPlugins::DockerProvider::Driver:0x00000001eded00> (NoMethodError)
      features/process.feature:8:in `Given there is a running VM called "vm1"'
    Then there should not be a process called "i-dont-exist" running # features/step_definitions/process.rb:12
      Vagrant attempted to call the action 'snapshot_rollback' on the provider
      'Docker (0ba23f6d0ad2f4164a3345226d014214bc0c0a55ba5780f6819fad0dc6c0836e)', but this provider doesn't support this action. This
      is probably a bug in either the provider or the plugin calling this
      action, and should be reported. (Vagrant::Errors::UnimplementedProviderAction)
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:168:in `block in action'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:474:in `lock'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `call'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/machine.rb:161:in `action'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/rollback.rb:31:in `block in execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:226:in `block in with_target_vms'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in `each'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in `with_target_vms'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/rollback.rb:29:in `execute'
      /home/erik/.vagrant.d/gems/gems/vagrant-multiprovider-snap-0.0.14/lib/vagrant-multiprovider-snap/command/root.rb:50:in `execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:42:in `execute'
      /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:292:in `cli'
      /home/erik/.vagrant.d/gems/gems/vagrant-cucumber-0.0.8/lib/vagrant-cucumber/step_definitions.rb:83:in `After'

Not sure if a Docker provider makes sense for vagrant-cucumber, but I am looking for something more efficient than Virtualbox or VMWare.

jtopper commented 10 years ago

The snapshot mechanism comes from https://github.com/scalefactory/vagrant-multiprovider-snap which we also maintain, but which doesn't support the Docker provider.

Our own use of vagrant-cucumber assumes that you want to snapshot the whole running state of the machine, rather than just the filesystem, and Docker doesn't (as far as I know) support that. I don't think there's any reason why we couldn't use whatever snapshots Docker does support though, if that'd be useful to you. Open a new issue (or a Pull Request ;) on the other project and we'll look from there.