Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #268 #269

Merged
merged 3 commits into from
Aug 23, 2016
Merged

Fix #268 #269

merged 3 commits into from
Aug 23, 2016

Conversation

gasserk
Copy link
Contributor

@gasserk gasserk commented Aug 8, 2016

I trouble running the test cases, but added a new case for "minimum" ec2 instance (without aws_ssh_key_id specified).

@@ -69,7 +69,7 @@ class Ec2 < Kitchen::Driver::Base # rubocop:disable Metrics/ClassLength
default_config :aws_access_key_id, nil
default_config :aws_secret_access_key, nil
default_config :aws_session_token, nil
default_config :aws_ssh_key_id, ENV["AWS_SSH_KEY_ID"]
default_config :aws_ssh_key_id, ENV["AWS_SSH_KEY_ID"] || nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The || nil here is redundant

@mwrock
Copy link
Member

mwrock commented Aug 9, 2016

besides the nit above. I think this is a good move but we need to fix the tests.

@gasserk
Copy link
Contributor Author

gasserk commented Aug 10, 2016

Fixed tests and all succeed locally with 'chef exec rake test' (see below).

Travis CI build is not working due to mismatch of dependencies in Travis build environment:

...
Gem::InstallError: rack requires Ruby version >= 2.2.2.
Installing descendants_tracker 0.0.4
An error occurred while installing rack (2.0.1), and Bundler cannot continue.
Make sure that `gem install rack -v '2.0.1'` succeeds before bundling.
The command "eval bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}" failed. Retrying, 2 of 3.
...

Output of local tests

 ✘  ~/Workspaces/kitchen-ec2   ssh-keys-optional ●  chef exec rake test
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
/opt/chefdk/embedded/bin/ruby -I/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-support-3.5.0/lib:/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources.rb:67: warning: shadowing outer local variable - name
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/jmespath-1.3.1/lib/jmespath/nodes/function.rb:210: warning: mismatched indentations at 'end' with 'def' at 195
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/instance_profile_credentials.rb:122: warning: assigned but unused variable - error
/Users/myaccount/Workspaces/kitchen-ec2/lib/kitchen/driver/ec2.rb:86: warning: possibly useless use of :: in void context
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/configurable.rb:185: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/config.rb:82: warning: method redefined; discarding old test_base_path
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/data_munger.rb:130: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/data_munger.rb:134: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55: warning: loading in progress, circular require considered harmful - /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen.rb
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/exe/rspec:4:in  `<main>'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:45:in  `invoke'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:71:in  `run'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:86:in  `run'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/runner.rb:100:in  `setup'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1433:in  `load_spec_files'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1433:in  `each'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1435:in  `block in load_spec_files'
        from /Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/rspec-core-3.5.2/lib/rspec/core/configuration.rb:1435:in  `load'
        from /Users/myaccount/Workspaces/kitchen-ec2/spec/kitchen/driver/ec2/image_selection_spec.rb:1:in  `<top (required)>'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
        from /Users/myaccount/Workspaces/kitchen-ec2/lib/kitchen/driver/ec2.rb:21:in  `<top (required)>'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:40:in  `require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:133:in  `rescue in require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:133:in  `require'
        from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen.rb:38:in  `<top (required)>'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
        from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/driver/proxy.rb:21:in  `<top (required)>'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in  `require'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/instance.rb:282: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/transport/base.rb:176: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/transport/base.rb:180: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/loader/yaml.rb:99: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/loader/yaml.rb:104: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/loader/yaml.rb:109: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/state_file.rb:91: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-3.2.0/lib/net/ssh/connection/session.rb:465: warning: mismatched indentations at 'end' with 'if' at 462
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-scp-1.2.1/lib/net/scp.rb:365: warning: shadowing outer local variable - ch
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-scp-1.2.1/lib/net/scp.rb:366: warning: shadowing outer local variable - ch
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-scp-1.2.1/lib/net/scp.rb:367: warning: shadowing outer local variable - ch
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-scp-1.2.1/lib/net/scp.rb:368: warning: shadowing outer local variable - ch
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/ssh.rb:182: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/ssh.rb:186: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/ssh.rb:189: warning: private attribute?
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/test-kitchen-1.10.2/lib/kitchen/ssh.rb:193: warning: private attribute?
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 13823
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/services/ec2.rb:8: warning: method redefined; discarding old create_tags
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/operation_methods.rb:18: warning: previous definition of create_tags was here
............................................../Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/shared_config.rb:211: warning: assigned but unused variable - default
/Users/myaccount/.chefdk/gem/ruby/2.1.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/shared_config.rb:215: warning: assigned but unused variable - default
       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: freebsd version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: fedora version  on x86_64. Instance Type: t2.micro. Default username: fedora (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: fedora version  on x86_64. Instance Type: t2.micro. Default username: fedora (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: freebsd version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: fedora version  on x86_64. Instance Type: t2.micro. Default username: fedora (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: freebsd version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: fedora version  on x86_64. Instance Type: t2.micro. Default username: fedora (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: freebsd version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: rhel version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: rhel version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: debian version  on x86_64. Instance Type: t2.micro. Default username: admin (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: windows version  on x86_64. Instance Type: t2.micro. Default username: administrator (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: centos version  on x86_64. Instance Type: t2.micro. Default username: centos (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: rhel version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: freebsd version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: rhel version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: rhel version  on x86_64. Instance Type: t2.micro. Default username: ec2-user (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
.       instance_type not specified. Using free tier t2.micro instance ...
       Detected platform: ubuntu version  on x86_64. Instance Type: t2.micro. Default username: ubuntu (default).
       instance_type not specified. Using free tier t2.micro instance ...
...........................

Finished in 0.35549 seconds (files took 0.41069 seconds to load)
120 examples, 0 failures

Randomized with seed 13823

@gasserk
Copy link
Contributor Author

gasserk commented Aug 20, 2016

Is there anything else I can do to facilitate acceptance of this PR?

@mwrock
Copy link
Member

mwrock commented Aug 20, 2016

I just submited PR #272 which once merged should get this green.

@mwrock
Copy link
Member

mwrock commented Aug 21, 2016

I reran the travis test after merging #272 and its green now so I'm 👍

@gasserk
Copy link
Contributor Author

gasserk commented Aug 23, 2016

Awesome! I don't see that LGTM quorum is required for this repo, but once this is merged, is there a Travis hook to publish to rubygems.org?

@cheeseplus
Copy link
Contributor

So we need to fix this repo but all the kitchen-* plugins maintained by @tk-core require two +1s but I think we only have that on the core repo at the moment.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants