1047 Commits

Author SHA1 Message Date
Carlos Rodrigues
22a22e8bb6 Missed a spot 2016-07-28 01:18:48 +01:00
Carlos Rodrigues
1b0a28bd4a One extra smoke test 2016-07-28 01:09:14 +01:00
Carlos Rodrigues
211523d052 Added tests for VAGRANT_DOTFILE_PATH 2016-07-28 01:01:29 +01:00
Seth Vargo
cf02135290 Merge pull request #7359 from mitchellh/sethvargo/cache_platform
Cache the results of common operations
2016-05-31 11:03:46 -04:00
Seth Vargo
49ce775b53
Prefix tempfiles with vagrant- 2016-05-31 00:18:16 -04:00
Seth Vargo
7014aa3bab
Remove custom tempfile class
This is not actually providing any additional utility and also causes
namespace conflicts with people trying to use the real Tempfile class.
2016-05-30 23:21:47 -04:00
Seth Vargo
2a230a11e2
Cache the results of common operations
This commit changes Vagrant::Util::Platform to cache the result of some
common operations. These values are highly unlikely to change over the
course of a single Vagrant run and they are only cached for that run.
2016-05-30 18:27:12 -04:00
Seth Vargo
b993699af6
Cleanup more files in tests 2016-05-29 00:34:00 -04:00
Seth Vargo
ca337122dc
Fix test issues 2016-05-28 23:44:11 -04:00
Seth Vargo
fb60d34236
Add unique names to all tmpdir and tempfile calls in tests + cleanup
This commit attempts to uniquely identify the temporary files and
directories that are created during test runs. Where it was a quick
fix, this commit also removes the temporary files and directories.

There are still a ton of temporary files due to calls to
.isolated_environment in the tests without an easy API an easy way
to provide a closer to that function.
2016-05-28 23:22:34 -04:00
Seth Vargo
27157b5408 Merge pull request #6893 from mmickan/prerelease-version-fix
Prerelease version fix
2016-02-03 09:57:25 -05:00
Seth Vargo
b24e69eb60 Always use a string for Vagrantfile version 2016-02-02 09:43:28 -05:00
Mark Mickan
31ece8324b Add tests for using prerelease box versions 2016-01-20 11:18:27 +10:30
Mitchell Hashimoto
884782f3ce Merge pull request #6603 from mitchellh/sethvargo/cleanup_output
Only run cleanup tasks when they are defined on the provisioner
2015-12-14 15:41:17 -08:00
Seth Vargo
4e21dd78e4 Ignore case when comparing checksums
Fixes GH-6648
2015-12-07 10:30:46 -05:00
Mitchell Hashimoto
30d9e243bb fix failing tests 2015-12-02 18:03:08 -08:00
Seth Vargo
64ff69c64b Only run cleanup tasks when they are defined on the provisioner
This helps with some confusion caused in GH-2538, since the output says:

> Running cleanup tasks for 'shell' provisioner...

But that's actually not true. It is running the cleanup tasks iff the 
provisioner defined a cleanup task. This commit changes the 
provisioner_cleanup middleware to only run cleanup tasks if the subclass
defines a cleanup task.

The reason we can't just check if the provisioner `respond_to?` the
`cleanup` method is because the parent provisioner base class (which 
all provisioners inherit from) defines a blank cleanup method. This is
important because it means we never risk calling an unimplemented
cleanup function, and it also helps define the public API for a 
provisioner.
2015-11-26 13:11:51 -05:00
Seth Vargo
8c3f833e8e Use the new presence helpers in the Chef provisioner 2015-11-23 18:33:47 -05:00
Seth Vargo
4c55c39b2d Add presence helpers 2015-11-23 18:04:18 -05:00
Mitchell Hashimoto
7f93868c86 Merge pull request #6567 from mitchellh/b-prune-folders
core: remove saved synced folders not from Vagrantfile
2015-11-23 10:06:51 -08:00
Mitchell Hashimoto
d5fa7416ff core: more heuristics for determining Cygwin 2015-11-21 11:17:36 -08:00
Mitchell Hashimoto
e1f8b0d9c0 more passing tests on Windows 2015-11-20 15:24:51 -08:00
Mitchell Hashimoto
9dc04b648c skip box add tests on Windows 2015-11-20 15:15:04 -08:00
Mitchell Hashimoto
fafd8b8986 more passing tests on Windows 2015-11-20 15:09:17 -08:00
Mitchell Hashimoto
27412e6ee9 core: fix some failing Windows tests 2015-11-20 14:54:38 -08:00
Mitchell Hashimoto
9c1b014536 core: remove saved synced folders not from Vagrantfile 2015-11-20 10:25:09 -08:00
Mitchell Hashimoto
1ccd91aada Merge pull request #4473 from rtkrruvinskiy/https_metadata
Add HTTPS download options to `box update` and `box outdated`
2015-11-19 16:16:48 -08:00
Mitchell Hashimoto
c541767949 core: add tests for box collection cleanup [GH-6002] 2015-11-19 15:59:58 -08:00
Mitchell Hashimoto
ed9bc1e847 Merge branch '3570-box-data-left' of https://github.com/ievgenp/vagrant into ievgenp-3570-box-data-left 2015-11-19 15:45:47 -08:00
Seth Vargo
aaed7c178f Add tests 2015-11-19 11:07:19 -08:00
Seth Vargo
c1623ee740 Fix port collision in tests 2015-11-18 18:47:19 -08:00
Mitchell Hashimoto
be29915bed Merge pull request #6542 from mitchellh/b-dotfile
core: don't make dotfile path if no Vagrantfile
2015-11-18 18:10:19 -08:00
Mitchell Hashimoto
646414b347 core: don't make dotfile path if no Vagrantfile 2015-11-18 17:48:24 -08:00
Mitchell Hashimoto
891c47c742 core: don't do HEAD request for box on non-HTTP [GH-5477] 2015-11-18 16:52:40 -08:00
Mitchell Hashimoto
1a7937ed50 core: don't replace insecure key on base package [GH-5310] 2015-11-18 16:25:07 -08:00
Mitchell Hashimoto
85f1e05e2a core: prune machine if non-existent CWD from index [GH-4742] 2015-11-18 15:48:59 -08:00
Mitchell Hashimoto
69d9bc0fe8 Environment can_install_provider and install_provider 2015-11-05 11:50:10 -08:00
Mitchell Hashimoto
32e981ce7c core: machine-readable output should include standard UI output
As a "ui" type
2015-10-26 18:10:26 -07:00
Mitchell Hashimoto
cc8cdafdc3 test: test for IsEnvSet 2015-10-07 22:54:27 -04:00
Mitchell Hashimoto
ec0b0fb7f9 providers/virtualbox: IPv6 host only networks 2015-09-30 17:23:25 -07:00
Sam Phippen
eeb750cd33 Catch encoding problems with sources provided to Vagrant::Config::Loader#set
Here we implement a naive solution to #5605 which catches the case that
a provided source contains an object which cannot be inspected, because
an object contained within in has an #inspect string that returns a
string that is incompatible with the encoding in
`Encoding.default_external` or a string which cannot be downcast to
7-bit ascii.

The Ruby VM implementation of "#inspect" implements this checking on
these lines of code: http://git.io/vZYNS. A Ruby level override of
this method does not cause this problem. For example:

```ruby
class Foo
  def inspect
    "😍".encode("UTF-16LE")
  end
```

will not cause the problem, because that's a Ruby implementation and the
VM's checks don't occur.

However, if we have an Object which **does** use the VM implementation
of inspect, that contains an object that has an inspect string which
returns non-ascii, we encounter the bug. For example:

```ruby
class Bar
  def inspect
    "😍".encode("UTF-16LE")
  end
end

class Foo
  def initialize
     @bar = Bar.new
  end
end

Foo.new.inspect
```

Will cause the issue.

The solution this patch provides basically catches the encoding error
and inserts a string which attempts to help the user work out which
object was provided without blowing up. Most likely, this was caused
by a user having a weird encoding coming out of one of the sources
passed in, but without a full repro case, it's not clear whether a patch
should be applied to a different object in the system.

Closes #5605.
2015-09-08 17:30:50 +01:00
Sam Phippen
790fa9f8e2 Add a failing test for #5605 2015-09-08 17:15:51 +01:00
Ievgen Prokhorenko
562ed26533 Fix #3570 'Box data left in ~/.vagrant.d/boxes after removal' 2015-07-19 16:44:38 +03:00
Mitchell Hashimoto
cea44847de Merge branch 'filter_synced_folders' of https://github.com/maxlinc/vagrant into maxlinc-filter_synced_folders 2015-07-09 15:05:52 -06:00
Mitchell Hashimoto
1330244fef core: save the UID that created a machine 2015-07-06 18:04:16 -06:00
Mitchell Hashimoto
6c06db776d core: test for URI escaping 2015-07-06 16:26:06 -06:00
Mitchell Hashimoto
341534299d core: ssh private_key_path overwrites insecure key [GH-5632] 2015-07-06 16:17:54 -06:00
Mitchell Hashimoto
e759df11a0 core: fix crash for missing options [GH-5550] 2015-07-06 10:36:41 -06:00
Seth Vargo
b92d4b21a1 Add UI::Interface#color? 2015-06-01 11:49:09 -04:00
Seth Vargo
294b0bca41 Merge pull request #5433 from marxarelli/feature/ui-custom-pipes
core: allow IO redirection of UI for testing
2015-05-30 12:49:09 -07:00