Commit Graph

353 Commits

Author SHA1 Message Date
Paul Hinze fef60242b0 provisioners/shell: fix validation for args [GH-1949]
The logic change in 57d4775140 introduced
a bug where neither strings nor arrays provided as `args` for shell
provisioners would pass validation.

This fixes that problem along with a few extras:

- split out arg validation into a private method
- update comment describing valid args
- add a few unit tests around config validation
2013-11-28 19:54:10 -06:00
phinze 688bca14f5 refactoring ubuntu/debian change_host_name
there's been a lot of churn around this code, so i figure it was worth
trying to clean it up.

 - the methods were doing a lot, so make them into template methods with
   one helper per step
 - spread out /etc/hosts regexp into a couple of helper variables for
   clarity
 - remove handling for broken hostname implementations (like basing all
   of the checks on name.split('.')[0]), since it seems reasonable to
   remove code dedicated only to handling broken boxes
 - DRY up the shared code between debian/ubuntu implementations, which
   clarifies the differences as well
 - add unit tests around the behavior; this will help us in the future
   to separate flaws in our understanding from flaws in implementation
 - includes a new DummyCommunicator in tests which should be useful in
   supporting additional unit testing of this kind
 - manually tested this on squeeze, wheezy, precise, quantal, raring,
   and saucy successfully.

handles the issue in #2333
2013-11-24 11:46:12 -06:00
Mitchell Hashimoto 97148379d2 providers/virtualbox: implement the synced folder plugin 2013-11-21 17:38:17 -08:00