Commit graph

6217 commits

Author SHA1 Message Date
Ryan Davis
eead889325 Fix test framework contention.
RSpec is used internally. Minitest is used for our tests. They don't
really like each other. This fixes that and gets our tests
consistently running the correct number of tests (they were load-order
dependent before and each platform had its own different number of
tests it would run).

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-15 00:33:53 -07:00
Ryan Davis
fa7a8c9e19 Normalizing two test declarations.
These tests both involve dynamic un-rooted classes. As such, they have
no name and thus print like #<Class:0xXXXXXXXX:...>. I switched one to
a describe instead of Class.new(Minitest::Test) and the other I
stringified the anonymous class.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:27:18 -07:00
Ryan Davis
f5d35494d9 Pulling requires out of often called methods.
While debugging this hairy situation, I had hooked require to try to
figure out sequencing. These requires were called thousands upon
thousands of times, creating a lot of noise and having no benefit
other than a possible savings of a few millisecond on an already slow
startup.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:25:28 -07:00
Ryan Davis
6adf1d2560 Remove all byebug requires in code.
Please don't leave debugging remnants in the code.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:24:14 -07:00
Chef Expeditor
e2426bf6b6
Bump version to 4.4.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-10 22:17:53 +00:00
Clinton Wolfe
58dde4f09f
Remove more magic comments (#4050)
Remove more magic comments
2019-05-10 18:17:38 -04:00
Miah Johnson
f7575cca00 Remove more magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-09 13:24:25 -07:00
Chef Expeditor
9cbd7c395f
Bump version to 4.4.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-09 17:56:53 +00:00
Miah Johnson
d5e19ae900
Merge pull request #4046 from inspec/mj/ftf
Fix broken tests after removing magic comments.
2019-05-09 10:56:37 -07:00
Chef Expeditor
5d6bb7753f
Bump version to 4.4.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-09 06:49:40 +00:00
Miah Johnson
bf28482350
Merge pull request #4043 from inspec/ap/no-resource-capitalize
Wrap resources in backticks and remove resource name capitalizing
2019-05-08 23:49:25 -07:00
Chef Expeditor
6d56b3e4d9
Bump version to 4.4.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 23:25:17 +00:00
Miah Johnson
5dd4356abf
Merge pull request #4042 from inspec/mj/resources
Relocate core resources from lib/resources to lib/inspec/resources
2019-05-08 16:24:59 -07:00
Miah Johnson
81c9a27b37 Fix broken tests after removing magic comments.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 16:17:25 -07:00
Chef Expeditor
845ecea1e7
Bump version to 4.4.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 20:25:05 +00:00
Bryan McLellan
90d4012f0a
Merge pull request #4045 from inspec/btm/omnibus-license
Convert Chef EULA to a local file
2019-05-08 16:24:39 -04:00
Bryan McLellan
0539e9afe8 Convert Chef EULA to a local file
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
2019-05-08 16:24:08 -04:00
Miah Johnson
25382bc281 Update require path in main resource loader
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 13:09:54 -07:00
Miah Johnson
0abac967f5 Update resource requires after relocation
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 13:09:54 -07:00
Miah Johnson
4172ae48fa Relocate resources to inspec/resources
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 13:09:54 -07:00
Chef Expeditor
b2a18a7aa4
Bump version to 4.4.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 20:01:20 +00:00
Miah Johnson
1b256e8761
Merge pull request #4024 from inspec/mj/com
Configure expeditor to delete the branch after it is merged.
2019-05-08 13:01:05 -07:00
Chef Expeditor
fbb4b78e51
Bump version to 4.4.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 20:00:26 +00:00
Miah Johnson
b4131b0799
Merge pull request #4041 from inspec/mj/encoding
Remove `# encoding: utf8` magic comments
2019-05-08 13:00:08 -07:00
Miah Johnson
11b8da3283
Merge branch 'master' into mj/encoding 2019-05-08 12:59:55 -07:00
Chef Expeditor
654a6617d3
Bump version to 4.4.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:58:16 +00:00
Miah Johnson
20bafdc4b2
Merge pull request #3988 from inspec/mj/coveralls
Add Coveralls.io support to InSpec
2019-05-08 12:58:00 -07:00
Chef Expeditor
08a92b510d
Bump version to 4.4.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:56:42 +00:00
Miah Johnson
1edfeae5f4
Merge pull request #4025 from inspec/mj/3849
Enable user telemetry opt-in / opt-out on cli
2019-05-08 12:56:29 -07:00
Chef Expeditor
5a98792a9e
Bump version to 4.4.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:49:36 +00:00
Clinton Wolfe
b3e5788d2a
Merge pull request #4036 from inspec/mj/dst
Add missing tests for DataSeries#enabled? #disable
2019-05-08 15:49:19 -04:00
Clinton Wolfe
f402391c4e
OSS Rollout Updates (#3942)
OSS Rollout Updates
2019-05-08 15:48:16 -04:00
Chef Expeditor
2bdae3b296
Bump version to 4.4.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:37:27 +00:00
Miah Johnson
9eeb8274cb
Merge pull request #3954 from cc-build/distro-identity
First step to get inspec names changeable
2019-05-08 12:37:12 -07:00
Chef Expeditor
59b5ee5260
Bump version to 4.4.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:32:48 +00:00
Miah Johnson
82f654195b
Merge pull request #3987 from IanMadd/changeInSpecText
Change software name from InSpec to Chef Inspec in documentation
2019-05-08 12:32:31 -07:00
Miah Johnson
dafd91898d
Merge branch 'master' into changeInSpecText 2019-05-08 12:32:04 -07:00
Chef Expeditor
ff82a7e2dc
Bump version to 4.4.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:24:07 +00:00
Miah Johnson
37ea6f2f77
Merge pull request #4023 from inspec/zenspider/minitest
Modernize use of Minitest.
2019-05-08 12:23:49 -07:00
Alex Pop
d7f06f98f1 Wrap resources in backticks and remove resource name capitalizing
Signed-off-by: Alex Pop <alexpop@users.noreply.github.com>
2019-05-08 20:17:51 +01:00
Chef Expeditor
4628036b57
Bump version to 4.4.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-08 19:08:17 +00:00
Miah Johnson
03887e8f74
Merge pull request #4038 from inspec/btm/omnibus-license
Update the omnibus build license to the Chef EULA
2019-05-08 12:08:01 -07:00
Bryan McLellan
241c1e7dfd Update the omnibus build license to the Chef EULA
The resulting distribuions are licensed under the Chef EULA.

Signed-off-by: Bryan McLellan <btm@loftninjas.org>
2019-05-08 11:12:45 -04:00
Miah Johnson
5a0913e3f6 Add missing tests for DataSeries#enabled? #disable
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:44:51 -07:00
Miah Johnson
d000f20f34 Update Collector#reset to clear telemetry_toggled_off
Updated the name of #reset -> #reset! as we are modifying state of a
singeton.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:36:45 -07:00
Miah Johnson
871b0e9a38 Ensure telemetry can be disabled
The #disable_telemetry method now toggles @telemetry_toggle_off.
The @telemetry_toggle_off is defaulted to false

The #telemetry_enabled? method now checks @telemetry_toggle_off
and we generally check the configuration. We do not flip
@telemetry_toggle_off based on the content of the configuration.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:30:24 -07:00
Miah Johnson
640d122327 Update Inspec::Config.mock in collector global methods
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 22:37:43 -07:00
Miah Johnson
046d4567ae rubocop
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:10:42 -07:00
Miah Johnson
0b9833dd96 condense true/false enabled tests
Because of the way the test system loads I cannot guarantee that
`Inspec::Config.cached` won't be nil. I have to always pass in a mock
config object with our setting.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:06:38 -07:00
Miah Johnson
ea0643cc14 Handle load_config better
private method to minimize external interface
default enabled to false if unable to find setting in configuration
add reader for config

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:04:51 -07:00