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)
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

index 253bd5c9b5b12352d213bce02b070bebfa9cbb2a..5bf4f32d257befc99f7b36219ac2cef6eecde021 100644 (file)
@@ -29,7 +29,7 @@ metadata:
       size: 16
   trace:
     byte-order:
-      le: -23
+      le: - 23
   streams:
     my_stream:
       packet-context-type:
This page took 0.025756 seconds and 4 git commands to generate.