Skip to content

Commit 24ecb40

Browse files
authored
docs: mark gd_req__doc_attr_status satisfied (#569)
We already implemented it. Now there is also two tests.
1 parent def73b8 commit 24ecb40

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

docs/internals/requirements/requirements.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,16 @@ Versioning
304304
:id: tool_req__docs_doc_generic_mandatory
305305
:tags: Documents
306306
:implemented: PARTIAL
307-
:version: 1
307+
:version: 2
308308
:satisfies:
309309
gd_req__doc_attributes_manual,
310-
gd_req__change_attr_impact_safety
310+
gd_req__change_attr_impact_safety,
311+
gd_req__doc_attr_status,
311312
:parent_covered: YES
312313

313-
Docs-as-Code shall enforce that each Generic Document ``doc__*`` has the following attributes:
314+
Enforce that each Generic Document ``doc__*`` has the following attributes:
314315

315-
* status
316+
* status (one of: valid, draft, invalid)
316317
* security
317318
* safety
318319
* realizes

src/extensions/score_metamodel/tests/rst/options/test_options_options.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,25 @@
233233
:safety: ASIL_B
234234

235235

236+
.. Tests if the attribute `status` follows the pattern `^(valid|draft|invalid)$`
237+
#EXPECT-NOT[+2]: does not follow pattern
238+
239+
.. document:: This is a test document
240+
:id: doc__test_good_3
241+
:status: draft
242+
:safety: QM
243+
244+
245+
#EXPECT[+4]: doc__test_bad_status_1.status (active): does not follow pattern `^(valid|draft|invalid)$`.
246+
#EXPECT[+3]: doc__test_bad_status_1: is missing required attribute: `security`.
247+
#EXPECT[+2]: doc__test_bad_status_1: is missing required link: `realizes`.
248+
249+
.. document:: This is a test document
250+
:id: doc__test_bad_status_1
251+
:status: active
252+
:safety: QM
253+
254+
236255
#EXPECT-NOT[+2]: does not follow pattern
237256

238257
.. stkh_req:: This is a test

0 commit comments

Comments
 (0)