Skip to content

Commit 724e9a8

Browse files
committed
test: add a test for allowing numbers in ionice class
1 parent 611c72b commit 724e9a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rotate_backups/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ def test_argument_validation(self):
118118
# Test that an invalid ionice scheduling class causes an error to be reported.
119119
returncode, output = run_cli(main, '--ionice=unsupported-class')
120120
assert returncode != 0
121+
# Test that a numbered ionice scheduling class does not causes an error.
122+
returncode, output = run_cli(main, '--ionice=3')
123+
assert returncode == 0
121124
# Test that an invalid rotation scheme causes an error to be reported.
122125
returncode, output = run_cli(main, '--hourly=not-a-number')
123126
assert returncode != 0

0 commit comments

Comments
 (0)