28 Commits

Author SHA1 Message Date
Chris Roberts
6e13612111 Add test coverage for architecture support 2023-09-14 16:15:03 -07:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
sophia
115bec2b05 Add test for validating box metadata.json 2022-09-14 14:05:27 -04:00
sophia
fffc555faf Add tests for new hook 2020-08-21 10:54:43 -05:00
Chris Roberts
5e0f64d654 Only run tests that require bsdtar if it is available 2019-06-19 15:29:55 -07:00
Chris Roberts
976320ec06 Limit automatic box outdated checks to once per hour 2018-11-01 09:45:11 -07:00
Brian Cain
8b1043c199 Remove stub methods and replace with allows for rpsec 3 2017-08-04 15:02:59 -07:00
Chris Roberts
1a62743bc5 Update rspec to recent version and fix deprecations 2017-08-03 17:54:07 -07: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
Mitchell Hashimoto
e1f8b0d9c0 more passing tests on Windows 2015-11-20 15:24:51 -08:00
Mitchell Hashimoto
1a08c4def5 core: Box#in_use? as an API 2014-04-25 02:02:49 -07:00
Mitchell Hashimoto
0e46c5d9de core: Raise predictable error if box metadata downlaod fails 2014-04-05 09:20:03 -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
61a1082d65 core: BoxCheckOutdated is *much* simpler, unified logic, tests 2014-02-05 21:20:18 -08:00
Mitchell Hashimoto
f2509f5c65 commands/box: outdated command to find outdated boxes 2014-02-05 21:20:10 -08:00
Mitchell Hashimoto
bd9f375263 core: Box can store a metadata URL 2014-02-05 21:20:07 -08:00
Mitchell Hashimoto
e8197c4e87 commands/box: list works with the new versions 2014-02-05 21:19:14 -08:00
Mitchell Hashimoto
d87c414327 core: Box has a version field 2014-02-05 21:19:10 -08:00
Mitchell Hashimoto
bf72c7cb5d core: human friendly error for corrupt box metadata 2013-11-23 11:54:42 -08:00
Mitchell Hashimoto
9464796c6d Human friendly error when metadata.json is missing from a box 2013-03-15 11:12:50 -07:00
Mitchell Hashimoto
cc076e5ee5 Box#repackage to repackage a box. 2012-07-11 18:36:22 -07:00
Mitchell Hashimoto
da15105a8f Make Box2 the new Box
This involved defaulting all box searching at the moment to VirtualBox.
Additionally, box upgrading is not yet handled. This needs to be done at
some point.
2012-07-11 18:36:21 -07:00
Mitchell Hashimoto
739d5ffb5f Lazy load attributes for runners. Get box repackage working. 2011-12-09 20:24:34 -08:00
Mitchell Hashimoto
d9321ed4d4 Box destroy works again 2011-12-09 18:06:34 -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