Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391469
cassandra_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
cassandra_spec.rb
View Options
require
'spec_helper_acceptance'
describe
'cassandra class'
do
install_pp
=
<<-
EOS
class { '::cassandra::datastax_repo': } ->
class { '::cassandra::java': } ->
class { 'cassandra':
service_ensure => 'stopped',
service_enable => false,
cassandra_9822 => true,
commitlog_directory_mode => '0770',
data_file_directories_mode => '0770',
saved_caches_directory_mode => '0770'
} ->
class { '::cassandra::optutils': } ->
class { '::cassandra::datastax_agent':
service_ensure => 'stopped',
service_enable => false,
} ->
class { '::cassandra::opscenter::pycrypto':
manage_epel => true,
} ->
class { '::cassandra::opscenter':
service_ensure => 'stopped',
service_enable => false,
} ->
class { '::cassandra::firewall_ports': }
# A workaround for Issue79.
if $::osfamily == 'Debian' {
exec { '/bin/chown root:root /etc/apt/sources.list.d/datastax.list':
refreshonly => true,
subscribe => Class[::cassandra::datastax_agent]
}
}
EOS
describe
'Initial install.'
do
it
'should work with no errors'
do
apply_manifest
(
install_pp
,
:catch_failures
=>
true
)
end
end
idempotent_pp
=
<<-
EOS
class { '::cassandra::datastax_repo': } ->
class { '::cassandra::java': } ->
class { 'cassandra':
service_ensure => 'stopped',
service_enable => false,
cassandra_9822 => true,
commitlog_directory_mode => '0770',
data_file_directories_mode => '0770',
saved_caches_directory_mode => '0770'
} ->
class { '::cassandra::optutils': } ->
class { '::cassandra::datastax_agent':
service_ensure => 'stopped',
service_enable => false,
} ->
class { '::cassandra::opscenter::pycrypto':
manage_epel => true,
} ->
class { '::cassandra::opscenter':
service_ensure => 'stopped',
service_enable => false,
}
EOS
describe
'Idempotency test.'
do
it
'should work with no errors'
do
expect
(
apply_manifest
(
idempotent_pp
,
:catch_failures
=>
true
)
.
exit_code
)
.
to
be_zero
end
end
#describe service('cassandra') do
#it { is_expected.to be_running }
#it { is_expected.to be_enabled }
#end
#describe service('datastax-agent') do
#it { is_expected.to be_running }
#it { is_expected.to be_enabled }
#end
#describe service('opscenterd') do
#it { is_expected.to be_running }
#it { is_expected.to be_enabled }
#end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:44 PM (14 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3359234
Attached To
R208 puppet-puppet-cassandra
Event Timeline
Log In to Comment