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:50:51 +0000 (10:50 -0400)
commitf033aaadf7d6838a2cb96c49b01811b7e78585a8
tree2391c796b696bb39bc5f088da5b7c57729ffec17
parente59dde4daa61cb9f9847e7d006f924ef03942dc3
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.023422 seconds and 4 git commands to generate.