Revision e641ea2a
Added by Ewoud Kohl van Wijngaarden over 7 years ago
spec/classes/katello_config_spec.rb | ||
---|---|---|
|
||
it 'should generate correct katello.yaml' do
|
||
should contain_file('/etc/foreman/plugins/katello.yaml')
|
||
content = catalogue.resource('file', '/etc/foreman/plugins/katello.yaml').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
verify_exact_contents(catalogue, '/etc/foreman/plugins/katello.yaml', [
|
||
':katello:',
|
||
' :rest_client_timeout: 3600',
|
||
' :post_sync_url: https://foo.example.com/katello/api/v2/repositories/sync_complete?token=test_token',
|
||
... | ... | |
' :qpid:',
|
||
" :url: amqp:ssl:localhost:5671",
|
||
' :subscriptions_queue_address: katello_event_queue'
|
||
]
|
||
])
|
||
end
|
||
end
|
||
|
||
... | ... | |
|
||
it 'should generate correct katello.yaml' do
|
||
should contain_file('/etc/foreman/plugins/katello.yaml')
|
||
content = catalogue.resource('file', '/etc/foreman/plugins/katello.yaml').send(:parameters)[:content]
|
||
content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [
|
||
verify_exact_contents(catalogue, '/etc/foreman/plugins/katello.yaml', [
|
||
':katello:',
|
||
' :rest_client_timeout: 3600',
|
||
' :post_sync_url: https://foo.example.com/katello/api/v2/repositories/sync_complete?token=test_token',
|
||
... | ... | |
' :port: 8888',
|
||
' :user: admin',
|
||
' :password: secret_password'
|
||
]
|
||
])
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
Use verify_exact_contents
This achieves the same but is slightly easier to read.