Fix: Invalid YAML test
authorErica Bugden <ebugden@efficios.com>
Wed, 19 Apr 2023 14:58:10 +0000 (10:58 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 21 Apr 2023 14:51:11 +0000 (10:51 -0400)
commit12df8592a309595a2556729a8640e5db6cd3abd7
tree6233cf6a01f8592ef4eda26edf526c4ac1063e09
parent47876c55852046c813af99548fc9fb07688ea25e
Fix: Invalid YAML test

In the original test, there was a space between '-' and '23' which is
invalid YAML syntax. However, this space was intentionally removed in
commit 688f203 (tests/config/fail/yaml/invalid.yaml: fix invalid YAML
(list/neg. value), May 2020)

It is not entirely clear what the intent of this test is, given the
space was intentionally removed, but it seems likely that the goal was
to test that when a YAML file contains invalid YAML syntax, the
configuration parsing will fail.

Without the space '-23', the test fails with this message:

Configuration: Cannot create configuration from YAML file
Configuration object:
`metadata` property:
`trace` property:
`byte-order` property: {'le': -23} is not of type 'string' (from schema
  `config/2/config`)

With the space '- 23', the test fails with this message:

Configuration: Cannot create configuration from YAML file
YAML loader: Cannot load file: sequence entries are not allowed here in
  "invalid.yaml", line 32, column 11

Replace space in '- 23' so that the test fails because of invalid YAML
syntax.

Change-Id: I262b5e664da0fbda820775eeaa3ac540f264b837
Signed-off-by: Erica Bugden <ebugden@efficios.com>
(cherry picked from commit 3dca662da1619d2cb4e0f1eea3caf160b785d2df)
tests/config/yaml/2/configs/fail/yaml/invalid.yaml
This page took 0.024135 seconds and 4 git commands to generate.