Infrastructure under the Magnifying Glass

http://www.agiletestingdays.com/session/infrastructure-under-the-magnifying-glass/

Example Project: DilloJs https://github.com/butjar/dillojs

Bats example: 

@test "mongo bla" {
  output=$("cmd")
  status=$?
  test[]
}

 

Serverspec example

require 'serverspec'
 set :backend, :exec # run locally
 
describe 'ngnix' do
 describe service 'ngnix' do
  it { expect(subject).to be_running }
  it { expect(subject).to be_enabled }
 end
 
 describe port 80 do
  it { expect(subject).to be_listening }
 end
 
 describe file '…' do
  let(:content) {subject.content}  
  it { expect(subject).to exist }
  it { expect(subject).to be_file }
  it { expect(content).to include('...') }
 end
end
 
describe 'node' do
 describe command 'node -v' do
  it { expect(subject.stdout).to match(/.../)}
 end
end

 

Ideas:

  • run kitchen & ansible in bamboo
    • provisioning & admin