Ryan Davis
bcf3aa841c
Skip failures from BK run.
...
Not sure why these failures come up in a unified run (versus my
running all test files separately). Might be test infection. Might be
environmental.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:59:01 -07:00
Ryan Davis
917a531a92
Skipped all failing tests on windows AT the failures site.
...
This activates a BUNCH of tests but keeps us green.
Whether these tests are valid or not is not being addressed here.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:09:08 -07:00
Ryan Davis
bd16b766fa
Renamed do_shell_c to assert_shell_c to make failures point to the right place.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
c6837a3915
Moved skip_windows! to top helper and extended date to end of next month.
...
Fixed up requires in v2/installer_test.rb so it sees the top helper.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
18ce4850f0
Initial pass to clean up functional testing wrt exit codes and output.
...
This should get windows tests running again? Hopefully? They're
running SO slowly on my vagrant box that I'm just pushing for now.
They're clean on the mac side.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Ryan Davis
d3df69213b
Fix handling using resources with incompatible resources (eg file + aws).
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-22 14:19:15 -07:00
Ryan Davis
14c245eccb
Refactoring inspec_exec_test.rb
...
+ Moved exit checks to be last.
+ Refactored the IO parts. WHY do the same thing over and over?!?
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-22 14:19:15 -07:00
Ryan Davis
f5d0d93121
This should get buildkite green for now.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-15 20:34:59 -07:00
Miah Johnson
a4f4fe5231
chefstyle -a; https://github.com/chef/chefstyle/pull/74
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-08 17:22:50 -07:00
Clinton Wolfe
4ce2192678
Impactful KPI upswing
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-12 19:09:11 -04:00
Clinton Wolfe
0b8da5bb01
update test expectation with improved log message
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-12 19:05:48 -04:00
Clinton Wolfe
dea323fa52
Test fixtures and failing functional test for input rename
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-12 19:00:53 -04:00
Ryan Davis
dd7f9abb20
Revamped test/functional/ui_test.rb to check output before exit codes.
...
Helps with debugging.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 21:32:22 -07:00
Ryan Davis
fae4230a41
Removing inspec/profile_vendor from inspec/base_cli.
...
This was the next most expensive require in the analysis.
Also rearranged the way that ui handled tables to be lazy.
```
% SLOW=1 time rake test:functional
before: Finished in 681.514579s, 0.5136 runs/s, 2.9919 assertions/s.
after : Finished in 642.655918s, 0.5446 runs/s, 3.1728 assertions/s.
```
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 19:16:58 -07:00
Ryan Davis
692d6a9ab8
hand applied one that is now marked as unsafe in rubocop
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 18:52:38 -07:00
Miah Johnson
729177f3c6
chefstyle -a
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-11 18:52:38 -07:00
Miah Johnson
e46018a517
chefstyle -a cleanup
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-11 18:52:38 -07:00
Ryan Davis
a5309ea392
blindly applied chefstyle -a
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 18:52:03 -07:00
Clinton Wolfe
9366804335
PR Feedback
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-06 12:51:22 -04:00
Clinton Wolfe
4b1ee722b4
Functional test for event log
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-06 12:51:22 -04:00
Clinton Wolfe
4eb815fdd7
syntaxo
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-06 12:51:22 -04:00
Clinton Wolfe
962dfc8d90
Failing tests for input plugin
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-06 12:51:21 -04:00
Ryan Davis
5e71a6b787
oops
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-04 00:19:26 -07:00
Ryan Davis
58fa148773
Stabilize windows functional testing.
...
Skip most everything.
After some digging, in those tests that didn't have 100% failures, of
the ~10+% passing, those tests weren't checking enough. So I skip them
too in the hopes that we improve testing across the board.
At this point, we need appveyor to be green more than we need these
tests to be fixed. If that means we skip them, so be it.
These tests will time-bomb at the end of July.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-03 23:27:26 -07:00
Ryan Davis
5573957c52
Go back to cmd from powershell.
...
Apparently it is too much of a shift and I tested too small of a
sample.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-03 23:11:26 -07:00
Ryan Davis
22635157b5
Merge pull request #4177 from inspec/zenspider/thread_safety_is_hard
...
Turn off parallel testing (for now?)
2019-06-03 23:04:03 -07:00
Ryan Davis
d2edd3ce68
Move minitest/hell to test/helper.
...
Probably going to remove this next and focus on opting-in to parallelization.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-03 14:12:06 -07:00
Miah Johnson
0aea548dd8
Update tests to use json-schema, and test something.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-01 23:17:53 -07:00
Miah Johnson
9a580407e6
brittle tests
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-31 11:43:44 -07:00
Miah Johnson
2a1b1d8e88
Remove all leading newlines.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-31 11:43:44 -07:00
Ryan Davis
d10591dc19
Some of our license tests fail if we have CHEF_LICENSE set, so wrap them up.
...
This still doesn't fix our parallelization issues. I think
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-30 11:17:19 -07:00
Ryan Davis
4790e288a0
Merge pull request #4142 from inspec/zenspider/clean_unnecessary_requires
...
Clean unnecessary requires
2019-05-29 18:33:06 -07:00
Ryan Davis
dfadc393b9
Even more removals and moves!
...
Turns out we don't even use CMD in any units... so why make it?
Lots of other stuff got ripped out. Tests basically shouldn't need to
require anything but 1 implementation file and a test framework.
Anything more than that is a smell.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 17:58:02 -07:00
Ryan Davis
a8bcba780f
Got the rest of the functionals to pass.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 17:58:02 -07:00
Ryan Davis
56924dbee1
Fix some of our functional failures on windows.
...
+ Add CHEF_LICENSE env variable.
+ Switch to using powershell to invoke inspec.
I still think we should look into using `spawn`, but this is a good
start.
This probably doesn't fix the rest of the tests, but they're SO slow
locally that I'm gonna start this PR.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 15:48:37 -07:00
Miah Johnson
6c19e81a06
Remove authors tags from source files.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-28 12:47:39 -07:00
Clinton Wolfe
c8f0de05af
inspec check: Send log to STDERR when running with --format json ( #4001 )
...
inspec check: Send log to STDERR when running with --format json
2019-05-28 14:44:44 -04:00
Ryan Davis
9e9cc42bf8
Another typo fixed.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-24 15:53:03 -07:00
Ryan Davis
4e5ddc051e
Fixed typo in filename
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-24 15:51:57 -07:00
Ryan Davis
9b7c292d4c
Use IO globals instead of IO constants.
...
Helps testing and lots of other things if we only use $stdout/$stderr.
STDOUT/STDERR should only be used to restore the globals.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 12:48:18 -07:00
Ryan Davis
06ead63972
Minor cleanup and a todo test.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
1ed4128942
Functional helper let changes.
...
Moved exec_inspec to inspec_path.
Added new exec_inspec that invokes ruby w/ -Ilib (expanded).
Decouples from bundler and/or needing inspec-bin to be installed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -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
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
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
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
Miah Johnson
11b8da3283
Merge branch 'master' into mj/encoding
2019-05-08 12:59:55 -07: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
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
Miah Johnson
659b4b373a
Remove # encoding: utf8
magic comments
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00
Clinton Wolfe
80b847ae83
Improve testing on inputs that do not have values ( #4007 )
...
Improve testing on inputs that do not have values
2019-05-07 15:01:09 -04:00
Clinton Wolfe
ce16120b18
Failing functional test for running inspec check with a deprecation
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-05-06 14:58:10 -04:00
Artem Sidorenko
96353a708a
First step to get inspec names changeable
...
for community distributions
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-06 18:40:35 +02:00
Clinton Wolfe
e280990e76
Test fixtures and failing functional tests for DSL
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 23:54:29 -04:00
Clinton Wolfe
4773023ef5
Add functional test to verify no-halt for undeclared inputs
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 22:51:56 -04:00
Clinton Wolfe
a282204b41
Update exe location in functional test helpers
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-29 13:27:10 -06:00
Clinton Wolfe
7d2028287c
Get unit and functional tests passing
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-26 13:14:32 -04:00
Clinton Wolfe
502cf1d7b9
Add test helper to detect all-passing exec run
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-26 13:14:32 -04:00
Clinton Wolfe
aae54d2cb6
Checkpoint commit after Input rename; precedence is broken
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-26 13:14:31 -04:00
Clinton Wolfe
65123b47c0
Don't use a profile with old-style attributes in vendor test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-25 17:37:13 -04:00
Clinton Wolfe
5383ca2040
Merge branch 'cw/apply-v4-deprecations' of github.com:inspec/inspec into cw/apply-v4-deprecations
2019-04-25 14:58:35 -04:00
Clinton Wolfe
ab0282f156
Revert "Skip legacy --json-config test until CLI setup is refectored"
...
This reverts commit 81c28d5b56
.
2019-04-25 14:51:33 -04:00
Clinton Wolfe
81c28d5b56
Skip legacy --json-config test until CLI setup is refectored
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-25 14:49:47 -04:00
Clinton Wolfe
23fdecd9c3
Make sure trailing newline is preserved when ignoring deprecations in functional tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-25 14:48:35 -04:00
Miah Johnson
12c94e1e97
Revert "Use ignore_deprecations
helper to silence warnings for cli.ui"
...
This reverts commit 144c482a24
.
2019-04-24 13:17:52 -07:00
Clinton Wolfe
91c0f1e83b
Rewrite fltertable functional tests to DRY up and avoid --json-config
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-24 11:37:43 -04:00
Miah Johnson
144c482a24
Use ignore_deprecations
helper to silence warnings for cli.ui
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-04-24 02:28:28 -07:00
Clinton Wolfe
f7b01093a4
Warn on using default with attributes
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-23 11:46:13 -04:00
Clinton Wolfe
aa19b6e99d
Add helper to filter out deprecations on stderr
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-23 11:46:13 -04:00
Clinton Wolfe
8d3e704532
Update CLI option for accepting license; licensing tests pass
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 14:20:41 -04:00
Clinton Wolfe
d94addf54a
Update functional test to remove interactive testing; impossible now with tty detection
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 13:11:11 -04:00
Clinton Wolfe
1c13bcc35e
Change exit code to 172 when license is not accepted
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
f7c4f56670
Ensure that an empty invocation does not trigger the license check
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
e0fe3f1876
Add version to list of exempt commands
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
30e5c39e74
tmpdir and mktmpdir are two verry different things
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
023bfefc67
Add ungated invocations
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
7d81f93496
Add test for interactively answering no
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
fb73b39976
Add tests for interactively answering yes
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
2f3adf6176
Add tests for when persistence file already exists
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
1c9533087d
Test when --accept-license is used
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
e3857a8783
Sketch of functional test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
066ed01259
Update winrm no-such-transport test to not use kerberos, which we do now support
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-09 15:43:37 -04:00
Clinton Wolfe
b701317616
Merge pull request #3879 from inspec/cw/attrs-rename-cli-option
...
Attribute->Input Rename: Rename cli option
2019-04-09 11:46:29 -04:00
Clinton Wolfe
2f5c063e08
Add 'passthrough' field
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-28 01:10:25 -04:00
Clinton Wolfe
a616205dfc
Add failing tests for moving the passthru logic to json-automate
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-28 01:07:41 -04:00
Clinton Wolfe
4b96929bf5
Modernize automate output test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-26 10:44:01 -04:00
devoptimist
2d49f39adc
moved example tests into their own sub dir, and reused examples_path variable
...
Signed-off-by: devoptimist <sbrown@chef.io>
2019-03-18 15:15:32 +00:00
devoptimist
94d80f6c8f
Decoupling test profiles from example profiles
...
Signed-off-by: devoptimist <sbrown@chef.io>
2019-03-14 00:32:13 +00:00
Clinton Wolfe
3cce8ba705
Replace attrs with input-files in remaining tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-08 12:40:33 -05:00
Clinton Wolfe
04b26dd417
Add failing functional tests for --attrs -> --input-file
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-08 11:37:38 -05:00
Clinton Wolfe
7328e82ae6
Implement credential set loading
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-27 15:14:27 -05:00
Clinton Wolfe
947cf32307
Fix version test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:44:25 -05:00
Clinton Wolfe
1dab1c1bd5
Skip a test related to input override and profile inheritance; we know this is in flux
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
c28c244f16
Fix a handful of functional tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
f7d58ad92c
Replace most mentions of attribute with input in test/
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
4f361bfc56
Replace most mentions of Attribute (titlecase) in lib and test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
785888a209
Rename functional tests, unit tests, and test fixtures
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-08 18:23:01 -05:00
Clinton Wolfe
fd3c3df8c1
Add failing functional tests for more piped config subcommands
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-08 13:18:08 -05:00
Clinton Wolfe
4cf9e23e9d
Move most test fixture profiles under attributes/
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 18:10:19 -05:00
Clinton Wolfe
cb3e0aca60
Test for piped config, and fix to make it work
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:27:49 -05:00