Commit graph

134 commits

Author SHA1 Message Date
Sonu Saha
9137afd84c RAKE TEST: Fix rake task for docs:cli
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-01-31 21:31:06 +05:30
Sonu Saha
ae90a28838
CFINSPEC-522: Remove rake tasks which are no longer used (#6367)
* CLEAN-UP: Remove unused rake tasks
missing, kitchen and version tasks are not used

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CLEAN-UP: Remove functional rake test
test:default covers both unit and functional tests
default was introduced to cover both functional and unit in PR #4102

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CLEAN-UP: Remove unused docs related tasks

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CLEAN-UP: Remove tasks/* from expeditor config

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* REVERT: Undo deletion of functional test

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* RECOVER: Retain docs:cli task

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* UNDO: Revert changes to config

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* CHORE: Add reference to this PR in note for future use

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

---------

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
2023-01-31 10:07:38 -05:00
jayashrig158
ffbf2ff554
add ruby test 3.1 in verify pipeline (#5892)
* add ruby test 3.1 in verify pipeline

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* updating rubygem to 3.3.3

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* Test fixture plugin files for ABI 3.1.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use kwargs to match new calling style for ERB in ruby 2.7 and 3.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Allow Date and Time data types, needed for waivers, since safe load is now the default for YAML

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use Time.parse, not Time.new since the rules tightened for what you can pass the constructor for waiver dates

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add ruby platform debug message to test parallel output

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Conditionalize permitted_classes in inputs yaml_load for <= 3.1.x only

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* In ruby 3.1.0 net/pop3 is no more a default gem and that will require us to add it in Gemfile so trying with the byebug gem which we are bundling already

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-166 Updated url fetcher to handle Net::OpenTimeout Exception on Windows

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-13 14:24:33 -04:00
Nikita Mathur
41ba05f901 Removed aws and azure resources, unit and integration tests
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-10 19:24:52 +05:30
Clinton Wolfe
a8298b42b7 Rename test:integration to test:kitchen for clarity in Rakefile
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-02 21:00:05 -04:00
Tim Smith
1da62112fd Remove the docker releasing rake task
We handle this in Expeditor now

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-12-09 10:48:28 -08:00
Tim Smith
bc904883dd Remove outdated / unmaintained maintainers task / docs
The task has been disabled for a while and the docs are totally out of date. Nuke this all and save ourselves some deps in the gemfile.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-12-08 17:12:38 -08:00
Tim Smith
535f12cfbd Remove thread requires as this is built in now
This is already required out of the box. no need to require it again.

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-09-15 23:59:49 -07:00
James Stocks
41b99e4e45 Add description to test:isolated task
Signed-off-by: James Stocks <jstocks@chef.io>
2020-06-25 14:57:24 +01:00
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