19 Commits

Author SHA1 Message Date
Chris Roberts
5d70cc3bf2 Retain original trigger behavior
These updates allow the after trigger to behave the same as the
original with regards to the execution location of the trigger
within the execution stack.
2020-04-03 15:47:00 -07:00
Chris Roberts
bcbbc825e0 Add test coverage on builder 2020-03-24 17:15:41 -07:00
Chris Roberts
d08c68ecf3 Adjust how trigger actions are inserted into the stack
This adjusts how triggers are implemented during a normal run. Any
defined triggers which are applicable are located and injected into
the run stack as the stack is built, including hook type triggers.

Support is included for dynamic hook lookup.

The data type used when defining triggers has also been relaxed to
support symbols, strings, or constants.
2020-03-17 15:07:36 -07:00
Brian Cain
09846b30fe
Fixup action tests
This commit fixes up the action tests by adding a `name` field for all
the Action classes used within the various tests.
2019-02-01 13:34:15 -08:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto
8c7ab333a0 Squash the f-docker-hostmachine branch.
Initial work

commands/up: make sure all names to with_target_vms are strings

providers/docker: create a docker host VM if needed

providers/docker: executor abstraction for driver to eventually support remote

providers/docker: vagrant executor

providers/docker: support creating the machine

providers/docker: status works if host VM is gone

providers/docker: use start fence to get real docker output

core: Call preserves stack ordering

core: support Message post option

providers/docker: Guard some features with HasSSH checks

providers/docker: much better messaging around create/destroy

providers/docker: output the container ID on create

providers/docker: copy the hostmachine Vagrantfile to the data dir

providers/docker: should make host machine before any up action

providers/docker: HandleBox before the host machine

providers/virtualbox: functional_vboxsf to disable vboxsf

providers/virtualbox: synced folder usable method should take 2 args

providers/docker: default machine name to :default
2014-04-21 13:54:33 -07:00
Fabio Rehm
54656151cf Convert specs to RSpec 2.14.8 syntax with Transpec
This conversion is done by Transpec 1.10.2 with the following command:
    transpec test/unit/

* 507 conversions
    from: obj.should
      to: expect(obj).to

* 394 conversions
    from: == expected
      to: eq(expected)

* 260 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 85 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 25 conversions
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

* 19 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 7 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 3 conversions
    from: Klass.any_instance.should_receive(:message)
      to: expect_any_instance_of(Klass).to receive(:message)
2014-03-14 12:02:07 -03:00
Mitchell Hashimoto
f203c29fbb Builders are merged when using hooks. [GH-1555] 2013-04-07 14:17:40 -07:00
Mitchell Hashimoto
e5539eb769 Only prepend/append once for hooks 2013-03-30 14:57:47 -07:00
Mitchell Hashimoto
d720205810 Builder supports action hooks 2013-02-06 15:06:13 -08:00
Mitchell Hashimoto
e822aac931 Convert builder tests to use rspec "subjects" 2013-02-06 14:25:36 -08:00
Mitchell Hashimoto
118377e6f0 Destroy sequence asks the user for confirmation. 2012-07-27 19:29:40 -07:00
Mitchell Hashimoto
556a53d48d You can no longer set env vars on Builders via use 2012-07-27 19:05:35 -07:00
Mitchell Hashimoto
3d147f1d96 Raise exception if the insert_before middleware is not found 2012-05-05 22:10:26 -07:00
Mitchell Hashimoto
879f98b5d5 Action builder supports indexing middlewares by name 2012-05-05 22:01:53 -07:00
Mitchell Hashimoto
d80ff0a27f Pull out port collision detection/correction into the CheckPortCollision middleware 2011-12-25 10:13:08 -08:00
Mitchell Hashimoto
3cd262ed75 Unit tests for Vagrant::Action::Builder 2011-12-22 20:17:45 -08:00
Mitchell Hashimoto
fe442faefa Move unit tests into the unit_legacy folder 2011-12-03 15:44:08 -08:00
Mitchell Hashimoto
ce5d989384 Moving unit tests to test/unit 2011-08-28 23:10:32 -07:00