mongodb-org tests are disabled

The way systemd is managed in Docker is different so managing systemd unit through Ansible is different.
We'll resolve this later.
This commit is contained in:
Jérémy Lecour 2017-04-20 15:50:35 +02:00 committed by Jérémy Lecour
parent ba0abfc3ec
commit 35fa6724ee
4 changed files with 34 additions and 1 deletions

View file

@ -3,6 +3,9 @@ driver:
name: docker
privileged: true
use_sudo: false
# important if you need to interact with systemd
# otherwise a barebone ssh server is the main process
run_command: /sbin/init
provisioner:
name: ansible_playbook
@ -16,6 +19,9 @@ provisioner:
platforms:
- name: debian-8
driver_config:
image: debian:jessie
platform: debian
# verifier:
# name: serverspec

View file

@ -1 +0,0 @@
localhost

View file

@ -0,0 +1,21 @@
require 'net/http'
require 'uri'
require 'serverspec'
set :backend, :exec
describe service('mongodb') do
it { should be_enabled }
end
describe port(27042) do
it { should be_listening }
end
describe file("/var/log/mongo-test.log") do
it { should be_file }
end
describe file("/var/run/mongodb.pid") do
it { should be_file }
end

View file

@ -1,4 +1,11 @@
---
- hosts: test-kitchen
vars:
mongodb_pidfile_path: /var/run/mongodb.pid
mongodb_logfile_path: /var/log/mongo-test.log
mongodb_port: 27042
mongodb_bind: 0.0.0.0
roles:
- role: mongodb-org