Fix: Invalid YAML test
authorErica Bugden <ebugden@efficios.com>
Wed, 19 Apr 2023 14:58:10 +0000 (10:58 -0400)
committerErica Bugden <ebugden@efficios.com>
Wed, 19 Apr 2023 15:19:29 +0000 (11:19 -0400)
commit3dca662da1619d2cb4e0f1eea3caf160b785d2df
tree4cfa73d2820f3469526af8f55d714feaa2d017ad
parent5a496a3d8f385ba3b427d2209509653fa847818f
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>
tests/config/yaml/2/configs/fail/yaml/invalid.yaml
This page took 0.023575 seconds and 4 git commands to generate.