Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Kajinami cbf0725557 Fix wrong test description
The value with a white space should be accepted instead of being
rejected. This change fixes the wrong test case description and makes
sure the description explains what is actually tested.

Change-Id: Ieec1d030981852e9e17afcea87dd14508243f3f4
2022-07-11 23:28:47 +09:00
Thomas Goirand c13f2ffe8a Switch to ini_settings
This fixes the puppet run going from ['32'] to '32' constantly.

Change-Id: Ifffe0e5835495221e94f5d4f0b48f171ede3eb09
2022-02-21 23:14:53 +09:00
Takashi Kajinami 341f6cf55e Load libraries in a single place
This change refactors how the dependent libraries are loaded during
unit tests, and load the libraries in the base spec_helper to avoid
duplicate and redundant implementations.

Change-Id: Id967a66f12a08da1e3ded2195cf7c3a711331347
2021-12-27 10:33:04 +09:00
Takashi Kajinami 5c47db969b Add support for MultiStrOpt
This replaces the provider implementation of designate_config type so
that MultiStrOpt, which is used by several options like
 - oslo_messaging_notifications/driver
 - oslo_policy/policy_dirs
are handled correctly.

Change-Id: Ibba47194e745d37607f20316674e168d342e0f85
2021-07-13 17:53:57 +09:00
Thomas Goirand 4c72eefcaf Add support for designate_api_uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Designate API. Therefore, this patch adds a new
designate_api_uwsgi_config provider as well as a new
designate::wsgi::uwsgi class.

Change-Id: Ie007ebb4f1c861d9ac719b0d2909dbe1eb0fac16
2021-04-13 00:05:19 +02:00
Takashi Kajinami e1d8a9ce89 Fix ignored unit tests
Unit test files should be named like *_spec.rb.

Change-Id: I4a5f1011f21c25e22f3a087e25d5f2974ec29b7b
2021-01-03 14:47:52 +09:00
Takashi Kajinami 10e6b7f334 Use anchor to require necessary packages
... so that correct packages are required without re-defining them in
resource implementations.

Change-Id: I2732e1870c93369e54598826d98b98db7c2d633f
2020-05-04 02:23:20 +09:00
alexey-mr 2d6b1d844d spec: Add Unit-Test for designate rootwrap_config and
paste_ini types/providers.

Additionally it contains patch with autorequire of designate-common
package for rootwrap_conf.

Change-Id: I64a75948f30661706ee6338448d9f662d28e871f
Partial-bug: #1440401
2016-03-11 15:26:38 +03:00
Yanis Guenane aa4184a043 Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in designate_config has been centralized in
openstack_config.

Impacted methods are :

  * section
  * setting
  * separator

Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.

The use case is the following :

designate_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual

designate_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent

That means that all the current :

if $myvar {
  designate_config { 'DEFAULT/foo' : value => $myvar }
} else {
  designate_config { 'DEFAULT/foo' : ensure => absent }
}

can be removed in favor of :

designate_config { 'DEFAULT/foo' : value => $myvar }

If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :

designate_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }

Change-Id: I16873c60bfce5b2f432f034755b7bfa3f1383dc5
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 10:56:46 +02:00
Yanis Guenane 712bfd942c Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.

Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.

Change-Id: I8f959e4ebbce2545843a901345a2ac3daf4259a1
2015-08-12 18:58:10 +02:00
Gael Chamoulaud 53d52c929a Use the new ':expect' syntax in rspec 3.x
- The old ':should' syntax in rspec 3.x is deprecated in favor of
  ':expect' syntax.

Change-Id: I9a28e00e6f4ef26205a01b739b6204a8cf11dbf6
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-03-20 11:24:20 +01:00
Sebastien Badia 343b049414 spec: Added designate::* unit tests
Change-Id: I01410468db17e84db0667ca4db4a58d0f108d8cc
2014-11-24 19:43:33 +01:00