This adds unit new test inputs, local to python-common that verify the
correct error messages are raised when count == 0 and count_per_host ==
0.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
placement:
count: 7.36
""", "num/count must be an integer value",),
+ ("""
+service_type: rgw
+service_id: foo
+placement:
+ count: 0
+""", "num/count must be >= 1",),
+ ("""
+service_type: rgw
+service_id: foo
+placement:
+ count_per_host: 0
+""", "count-per-host must be >= 1",),
])
def test_service_spec_validation_error(y, error_match):
data = yaml.safe_load(y)