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

Add the mock transport to train-core #308

Merged
merged 2 commits into from Jun 14, 2018
Merged

Conversation

jquick
Copy link
Contributor

@jquick jquick commented Jun 14, 2018

Signed-off-by: Jared Quick jquick@chef.io

We need to add mock to the train-core so inspec check and other things that rely on mock work as expected. Before and after testing:

jquick@Jareds-MBP:~/Chef/inspec/_test
(master)> inspec check long_commands
/Users/jquick/.gem/ruby/2.4.3/gems/train-core-1.4.11/lib/train.rb:47:in `rescue in load_transport': Can't find train plugin "mock". Please install it first. (Train::UserError)
        from /Users/jquick/.gem/ruby/2.4.3/gems/train-core-1.4.11/lib/train.rb:39:in `load_transport'
        from /Users/jquick/.gem/ruby/2.4.3/gems/train-core-1.4.11/lib/train.rb:20:in `create'
        from /Users/jquick/.gem/ruby/2.4.3/gems/inspec-core-2.2.10/lib/inspec/backend.rb:46:in `create'
        from /Users/jquick/.gem/ruby/2.4.3/gems/inspec-core-2.2.10/lib/inspec/cli.rb:71:in `check'
        from /Users/jquick/.gem/ruby/2.4.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /Users/jquick/.gem/ruby/2.4.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /Users/jquick/.gem/ruby/2.4.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /Users/jquick/.gem/ruby/2.4.3/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /Users/jquick/.gem/ruby/2.4.3/gems/inspec-core-2.2.10/bin/inspec:12:in `<top (required)>'
        from /Users/jquick/.gem/ruby/2.4.3/bin/inspec:23:in `load'
        from /Users/jquick/.gem/ruby/2.4.3/bin/inspec:23:in `<main>'

jquick@Jareds-MBP:~/Chef/inspec/_test
(master)> inspec check long_commands
Location:    long_commands
Profile:     long_commands
Controls:    7
Timestamp:   2018-06-14T09:21:47-04:00
Valid:       true

No errors or warnings

Signed-off-by: Jared Quick <jquick@chef.io>
Signed-off-by: Jared Quick <jquick@chef.io>
Copy link
Contributor

@clintoncwolfe clintoncwolfe left a comment

Choose a reason for hiding this comment

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

thanks @jquick !

@clintoncwolfe clintoncwolfe merged commit d701d59 into master Jun 14, 2018
@clintoncwolfe clintoncwolfe deleted the jq/add_mock_to_core branch June 14, 2018 17:26
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.

None yet

3 participants