Commit 0e1dfb75 authored by Matthieu FAURE's avatar Matthieu FAURE

FEAT Have functional unit-tests for mariadb class

parent 191c4373
Pipeline #6468 failed with stages
in 1 minute and 55 seconds
......@@ -10,3 +10,5 @@ fixtures:
augeasproviders_core: "herculesteam-augeasproviders_core" # for Redis
augeasproviders_sysctl: "herculesteam-augeasproviders_sysctl" # for Redis
epel: "stahnma-epel" # for Redis
mariadb: "puppetlabs-mysql"
translate: "puppetlabs/translate" # for Mysql
require 'spec_helper'
describe 'nextcloud::mariadb' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
os_facts.merge(root_home: '/root') # merging custom fact "root_home" is required for mariadb
end
let(:pre_condition) do
"
class { 'nextcloud':
db_password => 'S3cr#TPassw0rdz',
nc_admin_username => 'ncadmin',
nc_admin_password => 'ncadminPassword',
manage_mariadb => true,
}
"
end
it { is_expected.to compile }
it { is_expected.to contain_class('mysql::server') }
it { is_expected.to contain_class('mysql::client') }
it { is_expected.to contain_class('mysql::bindings') }
it { is_expected.to contain_mysql__db('nextcloud') }
# package_name (mariadb-server) does not seem to be taken in account
it { is_expected.to contain_package('mysql-server') }
it { is_expected.to contain_service('mysqld') }
# it { is_expected.to contain_package('mariadb-server') }
# it { is_expected.to contain_service('mariadb') }
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment