Skip to content

Commit

Permalink
Turn off aws and azure testing via NO_AWS env.
Browse files Browse the repository at this point in the history
This massively speeds up our testing, shaving our functionals by a
third (639s -> 423s). We can realize this speedup either by setting
the env or by jettisoning aws and azure into their own separately
tested gems.

This is currently turned off for travis just for demonstration
purposes.

Signed-off-by: Ryan Davis <zenspider@chef.io>
  • Loading branch information
zenspider committed Jun 11, 2019
1 parent d6f11ad commit b45778b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ before_install:
- gem --version
- bundle --version
env:
- SLOW=1
- SLOW=1 NO_AWS=1
- CI_ENABLE_COVERAGE=true SLOW=1
script: bundle exec rake $SUITE
matrix:
Expand All @@ -31,7 +31,7 @@ matrix:
- os: osx
env: CI_ENABLE_COVERAGE=true SLOW=1
- os: linux
env: SLOW=1
env: SLOW=1 NO_AWS=1
include:
- rvm: 2.6.3
- rvm: 2.5.5
Expand Down
2 changes: 1 addition & 1 deletion lib/inspec/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Detect if we are running the stripped-down inspec-core
# This relies on AWS being stripped from the inspec-core gem
inspec_core_only = !File.exist?(File.join(File.dirname(__FILE__), '..', 'resource_support', 'aws.rb'))
inspec_core_only = ENV['NO_AWS'] || !File.exist?(File.join(File.dirname(__FILE__), '..', 'resource_support', 'aws.rb'))

require 'rspec/matchers'

Expand Down

0 comments on commit b45778b

Please sign in to comment.