SaltwaterC / serverspec-aws

Serverspec resources for AWS
Other
12 stars 9 forks source link

serverspec-aws resources not resolvable #7

Open temyers opened 7 years ago

temyers commented 7 years ago

Test Case:

git checkout https://github.com/temyers/serverspec-aws-it
cd serverspec-aws-it
bundle install
bundle exec rake

Expected: the test cases should pass Actual: An error is generated: uninitialized constant EC2 (NameError)

Repository: https://github.com/temyers/serverspec-aws-it Travis Job: https://travis-ci.org/temyers/serverspec-aws-it/jobs/213699248

I am guessing that this is related to the use of require_all and require_rel and caused by an upstream change.

temyers commented 7 years ago

By using require_relative '../../serverspec-aws/lib/serverspec-aws' rather than require 'serverspec-aws', the tests pass as expected (assuming serverspec-aws is checked out to a companion directory.)

temyers commented 7 years ago

Looking at another project with working dependencies:


Gems included by the bundle:
  * ansible_spec (0.2.8)
  * aws-sdk (2.6.14)
  * aws-sdk-core (2.6.14)
  * aws-sdk-resources (2.6.14)
  * builder (3.2.2)
  * bundler (1.14.6)
  * ci_reporter (2.0.0)
  * ci_reporter_rspec (1.0.0)
  * diff-lcs (1.2.5)
  * hostlist_expression (0.2.1)
  * jmespath (1.3.1)
  * multi_json (1.12.1)
  * net-scp (1.2.1)
  * net-ssh (3.2.0)
  * net-telnet (0.1.1)
  * netaddr (1.5.1)
  * oj (2.17.5)
  * rake (11.3.0)
  * require_all (1.3.3)
  * rspec (3.5.0)
  * rspec-core (3.5.4)
  * rspec-expectations (3.5.0)
  * rspec-its (1.2.0)
  * rspec-mocks (3.5.0)
  * rspec-support (3.5.0)
  * serverspec (2.37.2)
  * serverspec-aws (0.1.0 b923fc2)
  * sfl (2.3)
  * specinfra (2.64.0)
  * trollop (2.1.2)
  * yamllint (0.0.9)```
temyers commented 7 years ago

Using gem 'serverspec-aws', :github => 'temyers/serverspec-aws', :branch => 'develop', the test passes as expected