Commit graph

1905 commits

Author SHA1 Message Date
Ryan Davis
f2155a64ed
Merge pull request #4843 from michaellihs/master
Add support for yocto linux in service resource
2020-01-29 16:19:27 -08:00
Ryan Davis
19ce5df589
Merge pull request #4827 from inspec/mj/namespaces
Move parsers under Utils
2020-01-29 16:18:43 -08:00
Ryan Davis
10406545ca
Merge pull request #4862 from inspec/zenspider/resources
Fix up the platform on etc_hosts, virtualization, ini, and xml resources to fix OS disparity.
2020-01-29 16:07:47 -08:00
Ryan Davis
2ae2bcf6fb
Merge pull request #4818 from JackChance/master
replaced instances of `have_protocols` with `have_protocol` in docume…
2020-01-29 15:46:25 -08:00
Ryan Davis
9c051da22b Fix platform on apache_conf to include all unix.
Now discovers the first available conf file from a list of known
paths. Might have to expand based on various distros.

Had to tweak the tests because the mock loader mocks EVERYTHING every
time. :/

Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-28 14:53:37 -08:00
Clinton Wolfe
3d5226fb68 Q-quote the args to the train plugin
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-28 13:48:10 -05:00
Clinton Wolfe
46ade02401
Use an archive if possible when fetching fails and --airgap is… (#4806)
Use an archive if possible when fetching fails and --airgap is provided
2020-01-28 10:02:57 -05:00
Ryan Davis
df31f744f4 Fix up platform on filesystem resource.
From linux to unix. This should work fine even on AIX, according to
the man pages.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-27 15:34:33 -08:00
Noel Georgi
7ac25401bb
Add: content option for x509_certificate
Signed-off-by: Noel Georgi <git@frezbo.com>
2020-01-22 13:49:35 +05:30
Michael Lihs
edd93eea81 Add support for yocto linux in service resource
Signed-off-by: Michael Lihs <michael.lihs@thoughtworks.com>
2020-01-18 01:26:16 +01:00
Miah Johnson
0d57612103 Update references to use new namespace
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2020-01-07 15:12:42 -08:00
Clinton Wolfe
ef9ef919fc Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
3e3398ff29 Switch to using tmpdir option during testing to avoid rm calls
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
ba4fa9832c parallelize fetcher tests, conditionalize automate fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
913c066be9 Test fixture and functional test for compliance fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
82ae3b5fa1 Test fixtures and functional test for local fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
ed209643f3 Test fixture for url fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
928cf6f05e Functional test and fixtures for git fetcher fallback
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:04 -05:00
Ryan Davis
f09595c33d
Merge pull request #4821 from inspec/zenspider/mocha2
Found and fixed more mocha/setup deprecations.
2020-01-02 16:07:35 -08:00
Ryan Davis
c57a0e1f13 Found and fixed more mocha/setup deprecations.
This level of duplication is not good.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:46:47 -08:00
Ryan Davis
73cccd8681 Cache the backend in profile_context_test.rb
And this speeds it up from 0.5s to 0.07s.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Ryan Davis
313f3462ca Cache MockLoader.connection.
Speeds up test/unit/profile/profile_context_test from 7-8s to 0.5s.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Ryan Davis
6426feeeb4 Removed the last of the metaprogramming from ControlEvalContext.
* Merged CEC.create args into CEC#initialize
* Converted the only call site of CEC.create to just call new.
* Added profile_context and resources_dsl accessors to CEC.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Clinton Wolfe
2409e8fb99 Set test skip bomb date to end of 2020Q1
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-31 12:19:27 -05:00
Cameron Straka
8b037fa9c2 replaced instances of have_protocols with have_protocol in documentation and examples
Signed-off-by: Cameron Straka <strakacameron@hotmail.com>
2019-12-31 10:51:55 -05:00
Ryan Davis
8e281e007e oops
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-24 04:11:17 -08:00
Ryan Davis
83f7504d7c
Merge pull request #4789 from Perceptyx/add-freebsd-package
Add suport for freebsd package resource
2019-12-17 14:05:40 -08:00
Felipe Zipitria
bff3fa960d
Add suport for freebsd package resource
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
2019-12-17 08:39:43 -03:00
Ryan Davis
e49efa2619 This should fix the mocha deprecations.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-16 15:01:38 -08:00
Ryan Davis
04581d2270
Merge pull request #4771 from inspec/zenspider/rspec-3.9
Bump rspec to 3.9 and fix broken tests.
2019-12-09 12:09:32 -08:00
Ryan Davis
f67171fa6b Bump rspec to 3.9 and fix broken tests.
Tests are STILL brittle, but this at least lets us drop old rspec.

Fixes #4575

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-06 16:52:35 -08:00
Clinton Wolfe
bba6d70b3b Raise FetcherFailure for url headers missing
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:58 -05:00
Clinton Wolfe
b34d489f5c Add .invalid TLD to test hostanmes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:58 -05:00
Clinton Wolfe
6b0877591f Refactor functional test to DRY up
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
8679443698 Functional test for git fetcher failure handling
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
4bda0ddeeb fixture and implementation for git fetcher failure handling
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
c1d1e6d12f functional test for URL fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
8a3213861a Fixture and implementation for URL fetcher
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
0ddf1687f5 A functional test for the local fetcher
I hate to do this, but unit testing this reveals odd behavior
in the fetcher - fetching in a unit harness appears to always succeed.
I'd like to make this into a unit test, but for now I want to focus on
the fetchers.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:30:08 -05:00
Clinton Wolfe
72f1011979 Fixture and implementation for local fetcher error handling
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:30:08 -05:00
Ryan Davis
c5e38d81c4
Merge pull request #4759 from inspec/zenspider/windows-again-and-again
Bump windows deadline AGAIN.
2019-12-03 18:43:31 -08:00
Ryan Davis
2fdd68c805 Bump windows deadline AGAIN.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-03 18:41:48 -08:00
Miah Johnson
b174273034
Merge pull request #4724 from mbaitelman/add_last_login_user
Add last login date to WindowsUser
2019-12-02 13:27:45 -08:00
Miah Johnson
7a837e16d1
Merge pull request #4745 from inspec/mj/cc-coverage
Enable Codeclimate Test Coverage
2019-12-02 13:27:00 -08:00
Ryan Davis
fe3c49e705
Merge pull request #4743 from inspec/zenspider/fixtures
Suppress output from rubygems installs.
2019-12-02 10:41:04 -08:00
Miah Johnson
fe8f868504 dont set a default simplecov format; we do that elsewhere.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-28 00:53:22 -08:00
Miah Johnson
9db7b70e30 remove coveralls; all we need is simplecov
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-27 22:12:48 -08:00
Ryan Davis
5a0be99ffb Added 2.7.0 gem repos to our fixtures.
This is NOT THE RIGHT WAY to do this... but it fixes a ton of tests. :(

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 15:42:52 -08:00
Ryan Davis
f2e4fb549c Address and fix all our ruby 2.7 warnings & errors.
This does NOT include fixes for our dependencies that are also having
2.7 warnings (which cause our functional tests to fail because for
some reason we expect stderr to be empty, which is brittle).

I've got upstream PRs to fix all of those. My tests pass locally. I
could push a commit that modifies the Gemfile to use my forks, but I'd
like to see how this fares for now.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 15:42:52 -08:00
Ryan Davis
d4b3a5c149 Suppress output from rubygems installs.
I still wish this wouldn't fetch or install... but in the meantime,
leave my dots alone.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 13:42:43 -08:00