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 support for the exec driver/transport #172

Merged
merged 1 commit into from
Sep 6, 2018

Conversation

hartmantis
Copy link
Contributor

There's not really any configuring to do. After mapping it to Inspec's local
backend, it just works.

➜  bundle exec kitchen verify
-----> Starting Kitchen (v1.20.0)
-----> Verifying <default-localhost>...
       Loaded tests from {:path=>".private.tmp.pantstest.test.integration.default"} 

Profile: tests from {:path=>"/private/tmp/pantstest/test/integration/default"} (tests from {:path=>".private.tmp.pantstest.test.integration.default"})
Version: (not specified)
Target:  local://

  File /tmp/pantstest.txt
     ✔  should exist

Test Summary: 1 successful, 0 failures, 0 skipped
       Finished verifying <default-localhost> (0m0.49s).
-----> Kitchen is finished. (0m2.85s)

Signed-off-by: Jonathan Hartman [email protected]

@hartmantis hartmantis requested a review from a team as a code owner March 9, 2018 23:24
There's not really any configuring to do. After mapping it to Inspec's local
backend, it just works.

Signed-off-by: Jonathan Hartman <[email protected]>
@hartmantis hartmantis force-pushed the jdh/exec-transport-support branch from dcaa0d2 to 90f5059 Compare March 9, 2018 23:34
@jquick
Copy link
Contributor

jquick commented Jul 5, 2018

Hey @RoboticCheese thanks for this PR! I have some questions about this implementation. If I understand this correctly we are just binding the runner to local backend which will actually test on the server running kitchen and not the targeted node created with kitchen(as your not using a transport to attach to the generated nodes). Can you lay out the use case for this?

@hartmantis
Copy link
Contributor Author

Your understanding is correct. The exec driver doesn't create any VMs, Docker containers, etc.; it just shells out on the local machine. The instance running Kitchen and the instance under test are one in the same. The only piece missing to get a successful verify is something mapping Kitchen's exec driver to Inspec's local backend.

I'm not sure what other folks use the exec driver for, but I use it for cookbook testing in TravisCI's macOS build environment and Appveyor's Windows build environment.

@lilithmooncohen
Copy link

Anything needed on this to move forward?

@lilithmooncohen
Copy link

lilithmooncohen commented Sep 4, 2018

Great work @RoboticCheese You just saved me a bunch of time. Using local exec for kitchen-terraform provider with the inspec validator and working great!

Copy link
Contributor

@jquick jquick left a comment

Choose a reason for hiding this comment

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

Thanks for this @RoboticCheese . Talked this over with the team and we will be using the 'local' keyword instead of 'exec' to remove confusion. I will create a follow up PR that will prefer and document the 'local' transport.

@jquick jquick merged commit 0590f1b into inspec:master Sep 6, 2018
@chris-rock
Copy link
Collaborator

@RoboticCheese nice work!
@jquick Are we tracking your planned improvements somewhere?

We should also document this behaviour in README.

@jquick
Copy link
Contributor

jquick commented Sep 7, 2018

@chris-rock issue is here #204

@hartmantis hartmantis deleted the jdh/exec-transport-support branch September 10, 2018 17:24
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.

4 participants