Skip to content

Instantly share code, notes, and snippets.

View nandotorres's full-sized avatar

Fernando Torres nandotorres

  • Avenue Code
  • Belo Horizonte, Brazil
View GitHub Profile
@nandotorres
nandotorres / default_spec.rb
Last active December 11, 2016 15:54
Specs for cookbook unit tests
require 'spec_helper'
describe 'techtalk::default' do
context 'When applying cookbooks on an Ubuntu instance' do
let(:chef_run) do
runner = ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
runner.converge(described_recipe)
end
it 'install docker' do
@nandotorres
nandotorres / default_test.rb
Created December 10, 2016 19:37
Inspec acceptance tests to be tested in a Kitchen cicle
describe service('docker') do
it { should be_running }
end
describe command('docker version') do
its(:stdout) { should match(/Client/) }
its(:stdout) { should match(/Server/) }
end
describe port(80) do
@nandotorres
nandotorres / .kitchen.yml
Last active December 10, 2016 20:16
kitchen configuration file to work with kitchen-docker.yml
driver:
name: docker
use_sudo: false
privileged: true
provisioner:
name: chef_solo
always_update_cookbooks: true
verifier: