# | | | | + expected result
# | | | | |
test_explicit_scheduler_results = [
- (k("* * 0 *"), error(SpecValidationError, 'num/count must be > 1')),
+ (k("* * 0 *"), error(SpecValidationError, 'num/count must be >= 1')),
(k("* e N l"), error(OrchestratorValidationError, 'Cannot place <ServiceSpec for service_name=mgr>: No matching hosts for label mylabel')),
(k("* e N p"), error(OrchestratorValidationError, 'Cannot place <ServiceSpec for service_name=mgr>: No matching hosts')),
(k("* e N h"), error(OrchestratorValidationError, 'placement spec is empty: no hosts, no label, no pattern, no count')),
raise SpecValidationError("num/count must be a numeric value")
if self.count != intval:
raise SpecValidationError("num/count must be an integer value")
- if self.count <= 0:
- raise SpecValidationError("num/count must be > 1")
+ if self.count < 1:
+ raise SpecValidationError("num/count must be >= 1")
if self.count_per_host is not None:
try:
intval = int(self.count_per_host)