Skip to content

Commit

Permalink
Merge pull request #827 from tschmidtb51/test-6-1-31
Browse files Browse the repository at this point in the history
Clarify test 6.1.31
  • Loading branch information
tschmidtb51 authored Nov 21, 2024
2 parents f7f2e15 + 526a890 commit 9a4fe44
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
For each element of type `/$defs/branches_t` with `category` of `product_version` it MUST be tested that
the value of `name` does not contain a version range.

> To implement this test it is deemed sufficient that, when converted to lower case,
> the value of `name` does not contain any of the following strings:
> To implement this test it is deemed sufficient that, when converted to lower case, the value of `name` satisfies the two requirements below:
>
> ```
> <
> <=
> >
> >=
> after
> all
> before
> earlier
> later
> prior
> versions
> ```
> 1. It does not contain any of the following operators:
>
> ```
> <
> <=
> >
> >=
> ```
>
> 2. If interpreted as a list of individual words separated by whitespace, the list does not contain any of the following keywords:
>
> ```
> after
> all
> before
> earlier
> later
> prior
> versions
> ```
The relevant paths for this test are:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/csaf_json_schema.json",
"document": {
"category": "csaf_base",
"csaf_version": "2.1",
"distribution": {
"tlp": {
"label": "CLEAR"
}
},
"publisher": {
"category": "other",
"name": "OASIS CSAF TC",
"namespace": "https://csaf.io"
},
"title": "Mandatory test: Version Range in Product Version (valid example 3)",
"tracking": {
"current_release_date": "2024-01-24T10:00:00.000Z",
"id": "OASIS_CSAF_TC-CSAF_2.1-2024-6-1-31-13",
"initial_release_date": "2024-01-24T10:00:00.000Z",
"revision_history": [
{
"date": "2024-01-24T10:00:00.000Z",
"number": "1",
"summary": "Initial version."
}
],
"status": "final",
"version": "1"
}
},
"product_tree": {
"branches": [
{
"category": "vendor",
"name": "Example Company",
"branches": [
{
"category": "product_name",
"name": "Product A",
"branches": [
{
"category": "product_version",
"name": "overall otter",
"product": {
"product_id": "CSAFPID-9080700",
"name": "Example Company Product A overall otter"
}
}
]
}
]
}
]
}
}
4 changes: 4 additions & 0 deletions csaf_2.1/test/validator/data/testcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,10 @@
{
"name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-31-12.json",
"valid": true
},
{
"name": "mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-31-13.json",
"valid": true
}
]
},
Expand Down

0 comments on commit 9a4fe44

Please sign in to comment.