Fixes: f69abe6291958a9ccfb85ce77c9b86e8af8ecf21
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
from mds_autoscaler.module import MDSAutoscaler
-
-@pytest.yield_fixture()
+@pytest.fixture()
def mds_autoscaler_module():
- yield MDSAutoscaler('cephadm', 0, 0)
+ yield MDSAutoscaler('mds_autoscaler', 0, 0)
class TestCephadm(object):
apply = OrchResult(result='')
_apply_mds.return_value = apply
-
_get.return_value = {
'filesystems': [
{
}
],
'standby_count_wanted': 2,
+ 'max_mds': 1
}
}
],
except FileNotFoundError:
val = None
mo = [o for o in self.MODULE_OPTIONS if o['name'] == key]
- if len(mo) == 1:
+ if len(mo) >= 1: # >= 1, cause self.MODULE_OPTIONS. otherwise it
+ # fails when importing multiple modules.
+ if 'default' in mo and val is None:
+ val = mo[0]['default']
if val is not None:
cls = {
'str': str,
mgr_util.py \
tests/ \
cephadm/ \
+ mds_autoscaler/ \
orchestrator/ \
insights/ \
pg_autoscaler/ \