Skip to content

Commit 1ee307e

Browse files
authored
Add name key to the upgrade execute schema (teemtee#4016)
Since tmt-1.55 keys unrecognized by a schema are considered a fail and not a warn. TMT defaults to insert the `name` in the execute phase before the schema validation, resulting in a 'name': 'default-x'. Example: ``` warn: /upgrade:execute - {'how': 'upgrade', 'url': 'https://gitlab.cee.redhat.com/oamg/rhel-major-upgrade', 'upgrade-path': '9to10.cut', 'name': 'default-0'} is not valid under any of the given schemas ``` Added `name` key in the upgrade schema. Removed the expectation of a `name` key not being recognized by a schema from test. Fixes teemtee#3974
1 parent e9a681c commit 1ee307e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/lint/plan/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ rlJournalStart
4242
rlAssertGrep "warn C000 value of \"how\" is not \"shell\"" $rlRun_LOG
4343
rlAssertGrep "warn C000 value of \"how\" is not \"fmf\"" $rlRun_LOG
4444
rlAssertGrep "warn C000 value of \"how\" is not \"tmt\"" $rlRun_LOG
45-
rlAssertGrep "warn C000 key \"name\" not recognized by schema /schemas/execute/upgrade" $rlRun_LOG
4645
rlAssertGrep "warn C000 value of \"how\" is not \"upgrade\"" $rlRun_LOG
4746
rlAssertGrep "fail C000 fmf node failed schema validation" $rlRun_LOG
4847
rlAssertGrep "fail P003 unknown execute method \"somehow\" in \"default-0\"" $rlRun_LOG

tmt/schemas/execute/upgrade.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ properties:
2525
exit-first:
2626
type: boolean
2727

28+
name:
29+
type: string
30+
2831
filter:
2932
$ref: "/schemas/common#/definitions/one_or_more_strings"
3033

0 commit comments

Comments
 (0)