Commit graph

280 commits

Author SHA1 Message Date
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
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