Skip to content

Commit

Permalink
stages(kickstart): do not allow extra options under clearpart
Browse files Browse the repository at this point in the history
Fix an oversight from osbuild#1426
  • Loading branch information
mvo5 committed Nov 9, 2023
1 parent b9ad7dd commit 884e4e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions stages/org.osbuild.kickstart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ SCHEMA = r"""
"clearpart": {
"description": "Removes partitions from the system, prior to creation of new partitions",
"type": "object",
"additionalProperties": false,
"properties": {
"all": {
"description": "Erases all partitions from the system",
Expand Down
1 change: 1 addition & 0 deletions stages/test/test_kickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def test_kickstart(tmp_path, test_input, expected):
({"clearpart": {"list": ["\n%pre not allowed"]}}, "not allowed' does not match"),
({"clearpart": {"list": ["no,comma"]}}, "no,comma' does not match"),
({"clearpart": {"disklabel": "\n%pre not allowed"}}, "not allowed' does not match"),
({"clearpart": {"random": "option"}}, "Additional properties are not allowed"),
# GOOD pattern we want to keep working
({"clearpart": {"drives": ["sd*|hd*|vda", "/dev/vdc"]}}, ""),
({"clearpart": {"drives": ["disk/by-id/scsi-58095BEC5510947BE8C0360F604351918"]}}, ""),
Expand Down

0 comments on commit 884e4e1

Please sign in to comment.