{"action":"created","issue":{"url":"https://api.github.com/repos/ryotarai/infrataster/issues/37","labels_url":"https://api.github.com/repos/ryotarai/infrataster/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ryotarai/infrataster/issues/37/comments","events_url":"https://api.github.com/repos/ryotarai/infrataster/issues/37/events","html_url":"https://github.com/ryotarai/infrataster/issues/37","id":40945428,"number":37,"title":"Support for Test Kitchen","user":{"login":"englishm","id":1165411,"avatar_url":"https://avatars.githubusercontent.com/u/1165411?v=3","gravatar_id":"","url":"https://api.github.com/users/englishm","html_url":"https://github.com/englishm","followers_url":"https://api.github.com/users/englishm/followers","following_url":"https://api.github.com/users/englishm/following{/other_user}","gists_url":"https://api.github.com/users/englishm/gists{/gist_id}","starred_url":"https://api.github.com/users/englishm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englishm/subscriptions","organizations_url":"https://api.github.com/users/englishm/orgs","repos_url":"https://api.github.com/users/englishm/repos","events_url":"https://api.github.com/users/englishm/events{/privacy}","received_events_url":"https://api.github.com/users/englishm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-08-22T20:05:57Z","updated_at":"2015-03-02T08:38:16Z","closed_at":null,"body":"It would be really great if we could integrate infrataster with our existing test-kitchen-based tests.\r\nWe often use [Test Kitchen](http://kitchen.ci/) with the [kitchen-digitalocean driver](https://github.com/test-kitchen/kitchen-digitalocean) so that we can launch tests in the cloud from a VM. Being able to run infrataster against that same instance would allow us to use infrataster as part of our existing CI system. Currently, I am only able to run infrataster tests locally where I have control over the IP address assigned to a VM (e.g. w/ Vagrant).\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/ryotarai/infrataster/issues/comments/76675016","html_url":"https://github.com/ryotarai/infrataster/issues/37#issuecomment-76675016","issue_url":"https://api.github.com/repos/ryotarai/infrataster/issues/37","id":76675016,"user":{"login":"estahn","id":362174,"avatar_url":"https://avatars.githubusercontent.com/u/362174?v=3","gravatar_id":"","url":"https://api.github.com/users/estahn","html_url":"https://github.com/estahn","followers_url":"https://api.github.com/users/estahn/followers","following_url":"https://api.github.com/users/estahn/following{/other_user}","gists_url":"https://api.github.com/users/estahn/gists{/gist_id}","starred_url":"https://api.github.com/users/estahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estahn/subscriptions","organizations_url":"https://api.github.com/users/estahn/orgs","repos_url":"https://api.github.com/users/estahn/repos","events_url":"https://api.github.com/users/estahn/events{/privacy}","received_events_url":"https://api.github.com/users/estahn/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T08:38:16Z","updated_at":"2015-03-02T08:38:16Z","body":"@englishm I tested @ryotarai suggestion and it works just fine.\r\n\r\nAdd a `Gemfile` to `test/integration/default/serverspec` with the following content:\r\n```ruby\r\nsource 'https://rubygems.org'\r\n\r\ngem 'infrataster'\r\n```\r\nAdd to your `spec_helper.rb` the above mentioned code. Here is an example of mine:\r\n```ruby\r\nrequire 'serverspec'\r\nrequire 'infrataster/rspec'\r\n\r\nset :backend, :exec\r\n\r\nInfrataster::Server.define(:app, '127.0.0.1')\r\n```\r\n\r\nStart writing your tests along with your serverspecs. Example\r\n```ruby\r\nrequire 'spec_helper'\r\n\r\n(9000..9002).each do |port|\r\n  describe port(port) do\r\n    it { should be_listening.on('127.0.0.1').with('tcp') }\r\n  end\r\n\r\n  describe server(:app) do\r\n    describe http(\"http://127.0.0.1:#{port}/healthcheck\") do\r\n      it \"responds content including 'WORKING'\" do\r\n        expect(response.body).to include('WORKING')\r\n      end\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nLet me know if you have any issues. It's working fine for me."}}