Commit graph

125 commits

Author SHA1 Message Date
Ryan Davis
81142952e5 Changing the rakefile setup so all gems get built.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-10 18:34:00 -08:00
Ryan Davis
ae0dead7be This is all dead. Removed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
933c95e27f Split lint to its own step and let all the others just run tests.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-04 12:25:29 -08:00
Ryan Davis
8cbbe248d1 Modify rake test to only run tests.
This drives me BONKERS.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 15:42:52 -08:00
Ryan Davis
d431912790 Switched parallel worker env var from N to K. Fixed windows parallel runs.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:51:56 -08:00
Ryan Davis
aa1d0283dd Added test:parallel task.
This one is just round robin in sorted order (so slow functionals are first)

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:51:56 -08:00
Ryan Davis
b1c2af209b Corresponding fixes for the move from test/unit/mock to test/fixtures.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-08 19:20:12 -08:00
Ryan Davis
866efdf141
Merge pull request #4531 from inspec/mj/wtf_rake
Remove maintainers task from require
2019-09-27 14:45:21 -07:00
Miah Johnson
31b24c4abf Remove maintainers task from require
[miah@awakening inspec]$ bundle exec rake
rake aborted!
NameError: uninitialized constant Faraday::Error::ClientError
Did you mean?  Faraday::ClientError
/home/miah/projects/github/.gems/inspec/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14:in `<module:Middleware>'
/home/miah/projects/github/.gems/inspec/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:11:in `<module:Octokit>'
...
/home/miah/projects/github/inspec/tasks/maintainers.rb:27:in `require'
...
(See full trace by running task with --trace)

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-09-27 14:18:50 -07:00
Ryan Davis
2cb05f2c66 Removed old test:isolated in favor of new one.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-13 17:14:32 -07:00
Ryan Davis
5e7c6d87e6 Added test:isolate2 that runs tests isolated but in parallel.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-13 17:14:32 -07:00
Ryan Davis
74479e0734 Clean up our use of SecureRandom in Rakefile.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-04 15:42:46 -07:00
Clinton Wolfe
2ef151dd56 Hrm, linting for upstream?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-19 13:52:28 -04:00
Ryan Davis
96d3d788ad Added test:missing rake task
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-29 11:42:30 -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
Robb Kidd
30a4f8ea58 use stdlib SecureRandom to generate a password
Replaces the now-yanked passgen gem with something available in the Ruby
standard library. Why `.alphanumeric(72)`? This method will reliably
crank out 72-character strings that meet the upper, lower, and numeric
requirement of Azure.

From the docs on the Azure terraform provider:

> NOTE: admin_password must be between 6-72 characters long and must
> satisfy at least 3 of password complexity requirements from the
> following:
> 1. Contains an uppercase character
> 2. Contains a lowercase character
> 3. Contains a numeric digit
> 4. Contains a special character

So, this should suffice.

Signed-off-by: Robb Kidd <robb@thekidds.org>
2019-07-01 14:15:37 -04:00
Miah Johnson
6965f9e385 Re-add rake test:
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-12 12:16:07 -07:00
Ryan Davis
a141870d19 Switch to chefstyle in test:lint task
Signed-off-by: Ryan Davis <zenspider@chef.io>
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
Miah Johnson
14ada2afb0 After further discussion, lets allow Warning to be toggled on by ENV
until things are better.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:46:22 -07:00
Miah Johnson
1e7003f2eb remove deprecated www release tasks
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:44:18 -07:00
Miah Johnson
945324a625 Allow warning disable via environment
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:44:18 -07:00
Miah Johnson
02f384aa56 All rake task verbose toggle through ENV['V']
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:44:18 -07:00
Miah Johnson
2a6e32e7a1 Move tasks under test namespace, accept license
moved lint, and 'test' under the `test:` namespace.
moved 'test' to `test:default`, lint is now `test:lint`.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:41:57 -07:00
Miah Johnson
12c9b002a6 Clean up Rakefile
Use GLOBS
Default tasks are lint and test
test task now does unit and functional

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:40:53 -07:00
Miah Johnson
524e177b5b Rebase master
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-06 13:40:53 -07:00
Ryan Davis
e7426658fd Fixed rake test:isolated task. The glob was far too limited.
Extracted a GLOBS const so it can be reused and only updated in one
place.

Added test:list that prints out all known test files.

Changed test:isolated to use the glob, AND to use system (sh would
fail out on the first failing test, so much of the looping mechanism
was redundant. I also changed the loop to run all of the tests
regardless of outcome, so you can see all the failures.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
35aceeb9ba Fixed rake test:resources task. The path was no longer valid.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Tim Smith
a05699c5c3 Build the InSpec gem directly in Kitchen so we can run locally
Before you had to kick off kitchen via Rake as the Rake task build the local gem we injected into the cookbook. Now we do it within Test Kitchen using a feature that didn't exist when this was all written. Also --output is your friend and greatly reduces the complexity of all this.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-05-15 15:46:09 -07:00
Miah Johnson
11b8da3283
Merge branch 'master' into mj/encoding 2019-05-08 12:59:55 -07: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
Ryan Davis
476c6878b3 Modernize use of Minitest.
+ Turn off verbosity in Rakefile by default. Use `rake V=1` to turn back on.
+ MiniTest -> Minitest everywhere.
+ MiniTest::Unit::TestCase -> Minitest::Test everywhere.
+ Updated minitest doco urls to official and up-to-date site.
+ Normalize requires. Only needs "minitest/autorun" and "minitest/pride".

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-03 15:01:57 -07:00
Clinton Wolfe
8bed893da2 An unportable and slow approach to installing
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-29 13:27:10 -06:00
Clinton Wolfe
735e7b060b Oh parens
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 16:14:45 -04:00
Clinton Wolfe
c6940be8d4 Make license touching for functional and int testing portable to windows
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:30:30 -04:00
Clinton Wolfe
8915ad049f Correct pre-integration task name
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:06:09 -04:00
Clinton Wolfe
3478ac3897 Add user messaging when writing a license file
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
d41dc48afa If the license was accepted only for testing, delete it at exit
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
71c13f38a4 Make functional and integration tests assume the license has been accepted
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
71cc147c58 Disable warnings for functional tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-09 15:25:14 -04:00
Jared Quick
d33d189d93
Create appvayor workers for Windows functional tests. (#3397)
* Add more windows functional tests and create some appvayor workers.
* Fix uuid test for automate

Signed-off-by: Jared Quick <jquick@chef.io>
2018-11-08 12:00:14 -05:00
Jared Quick
cb12ada2fe
Move compliance to v2 plugin (#3423)
* Move compliance pluging to v2 system.
* Update kitchen-inspec to test.
* Add legacy require patsh.
* Fix unit test

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-04 14:31:39 -04:00
Jared Quick
39b3b7135e
Add audit-cookbook integration testing (#3431)
* Add audit integration testing.
* Add some docs and feedback changes.
* Updated integration task to use paramaters and clean it up.
* Fix unit test

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-25 15:53:26 -04:00
Clinton Wolfe
50ff9f6a24
Plugins: Add support for 'bundles' migration (#3384)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 00:00:54 -04:00
Jerry Aldrich
bbc4002b53 Fix profile vendoring on Windows (#3378)
* Fix profile vendoring on Windows

This fixes vendoring on Windows by doing the following:
  - Expanding relative paths (handles `\\`)
  - Ensuring archives after closed after reading (prevents locking)

This also does the following:
  - Removes extra file from testing tar archive
  - Ensures fetching dirs/archives in the local fetcher behaves the same

* Fix profile vendoring on Windows

This fixes vendoring on Windows by doing the following:
  - Expanding relative paths (handles `\\`)
  - Ensuring archives after closed after reading (prevents locking)

This also does the following:
  - Removes extra file from testing tar archive
  - Ensures fetching dirs/archives in the local fetcher behaves the same

* Add vendoring to fuctional testing and fix the tmp path for windows

* Add tests for relative paths and backslashes

* Remove backslashes support in filenames on Linux

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-13 20:19:02 -04:00
Jared Quick
6445e2c6d5
Add windows functional tests (#3385)
* Add windows functional tests.
* Fix tests for 2012 server.
* Fix windows build script
* Add more functional tests for windows.
* Update comment with TODO.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 18:04:16 -04:00
Clinton Wolfe
fa0a6c9794 Ability to render contrib resource pack docs on main website (#3184)
* Sketch out contrib doc fetcher
* Read contrib config file
* Fetch contrib resource packs from git
* Copy in resource pack docs from contrib
* Task to cleanup copied-in files
* Attach contrib resource pack docs fetching to main website doc generation
* Refactor - rename vars in resource overview task for clarity
* Generate resource overview page using info from contrib
* Fix issue in which AWS and Azure resources were ending up under OS
* Trigger contrib doc cleanup after doc build
* Comment out the contrib.yaml for now
* Disable contrib tasks if git is not available
* Rubocop issues
* Allow .md as doc file ending
* Fix for files ending in md having a relative link
* Omit 'resources' from section labels to save width
* Rubocoooooooooooppppp

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-02 11:43:46 -04:00
Miah Johnson
67bbbb6ecf Split inspec into a core gem. (#3008)
* Split inspec into a core gem.
* Include inspec-core.gemspec, not inspec.gemspec.
* Only load aws and azure when the gems are installed.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-05-03 10:30:01 -04:00
David McCown
23967a2849 Refactors Terraform plan to break out steps (#2996)
This change should make it easier to work with a running environment.
You may now apply changes without doing a full teardown/rebuild any time
you make a change to the terraform plan.

Adds some documenation on how to use the Terraform tooling.

Adds AZURE_LOCATION to override the default region.

Signed-off-by: David McCown <dmccown@chef.io>
2018-04-29 14:00:12 -04:00