Skip to content

Commit

Permalink
Allow duration in the execute schema
Browse files Browse the repository at this point in the history
This attribute is accepted and tested, schema validation needs to
respect that.
  • Loading branch information
lukaszachy authored and psss committed May 2, 2024
1 parent 0995849 commit 0503666
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions tmt/schemas/common.yaml
Expand Up @@ -159,6 +159,7 @@ definitions:

# https://tmt.readthedocs.io/en/stable/spec/tests.html#duration
# https://tmt.readthedocs.io/en/stable/spec/plans.html#shell
# https://tmt.readthedocs.io/en/stable/spec/plans.html#script
duration:
type: string
pattern: "^[0-9]+[smhd]?$"
Expand Down
3 changes: 3 additions & 0 deletions tmt/schemas/execute/tmt.yaml
Expand Up @@ -34,5 +34,8 @@ properties:
where:
$ref: "/schemas/common#/definitions/where"

duration:
$ref: "/schemas/common#/definitions/duration"

required:
- how
3 changes: 3 additions & 0 deletions tmt/schemas/execute/upgrade.yaml
Expand Up @@ -50,5 +50,8 @@ properties:
where:
$ref: "/schemas/common#/definitions/where"

duration:
$ref: "/schemas/common#/definitions/duration"

required:
- how
3 changes: 1 addition & 2 deletions tmt/schemas/test.yaml
Expand Up @@ -32,8 +32,7 @@ properties:

# https://tmt.readthedocs.io/en/stable/spec/tests.html#duration
duration:
type: string
pattern: "^([0-9]+ *?[smhd]? *)+$"
$ref: "/schemas/common#/definitions/duration"

# https://tmt.readthedocs.io/en/stable/spec/core.html#enabled
enabled:
Expand Down

0 comments on commit 0503666

Please sign in to comment.