Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit a5c0db80 authored by Benedikt Wegmann's avatar Benedikt Wegmann
Browse files

spec/classes/docker_spec.rb

parent e4cfa07d
No related branches found
No related tags found
No related merge requests found
require 'spec_helper'
describe "ubuntu_server::docker" do
let(:facts) {{
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_exec('docker-apt-repo') }
it { is_expected.to contain_exec('apt-get-update') }
it { is_expected.to contain_file('/etc/apt/sources.list.d/docker.list') }
it { is_expected.to contain_package('lxc-docker').with_ensure('purged') }
it { is_expected.to contain_package('docker-engine').with_ensure('present') }
it { is_expected.to contain_service('docker').with_ensure('running') }
context "with class defaults and docker_compose_version=1.8.0" do
let(:facts) {{
:docker_compose_version => '1.8.0',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_exec('docker-compose') }
it { is_expected.to contain_exec('docker-compose-bash-completion') }
it { is_expected.to contain_file('/usr/local/bin/docker-compose') }
end
context "with class defaults and docker_compose_version=1.8.1" do
let(:facts) {{
:docker_compose_version => '1.8.1',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.not_to contain_exec('docker-compose') }
it { is_expected.not_to contain_exec('docker-compose-bash-completion') }
it { is_expected.not_to contain_file('/usr/local/bin/docker-compose') }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment