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

Come up with a way to test the register resource for tentacles #62

Open
brentm5 opened this issue Sep 6, 2016 · 0 comments
Open

Come up with a way to test the register resource for tentacles #62

brentm5 opened this issue Sep 6, 2016 · 0 comments

Comments

@brentm5
Copy link
Member

brentm5 commented Sep 6, 2016

Goals

The goals of this should be that the register functionality should be able to be tested in appveyor so that we can verify the service started up and that the tentacle registered successfully.

First thoughts

I think this can be achieved because appveyor has sql server installed on the machines already and we can configure our tests cases to create and setup our sql server instance and start up the server instance. Then we could write a custom powershell script to connect via basic auth and setup a simple test environment with roles and whatnot to verify that we can register a tentacle. There would be some sort of hacking to inject the generated auth key into the tentacle chef-client run, but having this path tested would be more powerful. THe appveyor build would go something like this:

  • Setup the machine with chefdk just like normal
  • Update the server test converge steps to connect to the local appveyor database
  • Run chef exec kitchen converge server (instead of just a global converge)
  • Run a script to mock and setup some data as well as write out some login information to disk so that we can read it into the tentacle to register
  • Run chef exec kitchen converge tentacle
  • Come up with another script to validate that the host is registered from the API.

I think this approach could work long term.

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

No branches or pull requests

1 participant