From 41c8b867dc2057933fce671f8c85e3b11385ea1d Mon Sep 17 00:00:00 2001 From: jitendra007 Date: Wed, 12 Aug 2020 11:17:53 +0530 Subject: fix snakeyaml vulnerability Issue-ID: VNFSDK-584 Signed-off-by: jitendra007 Change-Id: Id91ed81d3b104e507eefc242a59e19918564233c --- .../src/test/java/org/onap/validation/yaml/YamlFileValidatorTest.java | 3 +-- .../src/test/java/org/onap/validation/yaml/YamlLoaderTest.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'csarvalidation/src/test') diff --git a/csarvalidation/src/test/java/org/onap/validation/yaml/YamlFileValidatorTest.java b/csarvalidation/src/test/java/org/onap/validation/yaml/YamlFileValidatorTest.java index d29b41a..f89cc68 100644 --- a/csarvalidation/src/test/java/org/onap/validation/yaml/YamlFileValidatorTest.java +++ b/csarvalidation/src/test/java/org/onap/validation/yaml/YamlFileValidatorTest.java @@ -86,13 +86,12 @@ public class YamlFileValidatorTest { public void shouldThrowErrorWhenGivenPathToInvalidPmDictionaryFile() { // given String path = getFullPathForGivenResources(YamlLoadingUtils.PATH_TO_MULTI_DOCUMENT_INVALID_YAML); - // when then assertThatThrownBy(() -> new YamlFileValidator().validateYamlFileWithSchema(path) ).isInstanceOf(ParserException.class) .hasMessageContaining( - "expected the node content, but found DocumentEnd" + "expected the node content, but found ''" ); } diff --git a/csarvalidation/src/test/java/org/onap/validation/yaml/YamlLoaderTest.java b/csarvalidation/src/test/java/org/onap/validation/yaml/YamlLoaderTest.java index 9e7af5d..e8bc7c1 100644 --- a/csarvalidation/src/test/java/org/onap/validation/yaml/YamlLoaderTest.java +++ b/csarvalidation/src/test/java/org/onap/validation/yaml/YamlLoaderTest.java @@ -65,7 +65,7 @@ public class YamlLoaderTest { // when then assertThatThrownBy(YamlLoadingUtils::tryToLoadMultiDocumentInvalidYamlFile ).isInstanceOf(ParserException.class) - .hasMessageContaining("expected the node content, but found DocumentEnd"); + .hasMessageContaining("expected the node content, but found ''"); } @Test @@ -73,7 +73,7 @@ public class YamlLoaderTest { // when then assertThatThrownBy(YamlLoadingUtils::tryToLoadMultiDocumentInvalidYamlFileUsingStringPath ).isInstanceOf(ParserException.class) - .hasMessageContaining("expected the node content, but found DocumentEnd"); + .hasMessageContaining("expected the node content, but found ''"); } } -- cgit 1.2.3-korg