Fuel Library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openstack_ha_radosgw_spec.rb 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. require 'spec_helper'
  2. describe 'openstack::ha::radosgw' do
  3. let :params do
  4. {
  5. :internal_virtual_ip => '127.0.0.1',
  6. :ipaddresses => ['127.0.0.2', '127.0.0.3'],
  7. :public_virtual_ip => '192.168.0.1',
  8. :baremetal_virtual_ip => '192.168.0.2',
  9. :server_names => ['node-1', 'node-2'],
  10. :public_ssl => true,
  11. :public_ssl_path => '/var/lib/fuel/haproxy/public_radosgw.pem',
  12. }
  13. end
  14. let :facts do
  15. {
  16. :kernel => 'Linux',
  17. :concat_basedir => '/var/lib/puppet/concat',
  18. :fqdn => 'some.host.tld'
  19. }
  20. end
  21. let :haproxy_config_opts do
  22. {
  23. 'option' => ['httplog', 'httpchk HEAD /', 'forceclose', 'forwardfor', 'http-buffer-request'],
  24. 'timeout' => 'http-request 10s',
  25. 'http-request' => 'set-header X-Forwarded-Proto https if { ssl_fc }',
  26. }
  27. end
  28. it "should properly configure radosgw haproxy based on ssl" do
  29. should contain_openstack__ha__haproxy_service('object-storage').with(
  30. 'order' => '130',
  31. 'listen_port' => 8080,
  32. 'balancermember_port' => 6780,
  33. 'public' => true,
  34. 'public_ssl' => true,
  35. 'public_ssl_path' => '/var/lib/fuel/haproxy/public_radosgw.pem',
  36. 'haproxy_config_options' => haproxy_config_opts,
  37. )
  38. end
  39. it "should properly configure radosgw haproxy on baremetal VIP" do
  40. should contain_openstack__ha__haproxy_service('object-storage-baremetal').with(
  41. 'order' => '135',
  42. 'listen_port' => 8080,
  43. 'balancermember_port' => 6780,
  44. 'public_virtual_ip' => false,
  45. 'internal_virtual_ip' => '192.168.0.2',
  46. 'haproxy_config_options' => haproxy_config_opts,
  47. )
  48. end
  49. end