diff options
author | Michal Banka <michal.banka@nokia.com> | 2020-08-04 14:58:25 +0200 |
---|---|---|
committer | Edyta Krukowska <edyta.krukowska@nokia.com> | 2020-08-19 15:07:14 +0200 |
commit | a0ba464faeb2e979d20758bc1091143108355974 (patch) | |
tree | 944b0f588daace51449b50ae94816f33a6a3c62d /src/test/java/org/onap/dcae/TLSTest.java | |
parent | f1ea637a60bace906db5619d71a914ad601e9478 (diff) |
Add implementation of stndDefined fields validation1.7.3
Added implementation of stndDefined fields from incoming events.
Validation is performed using external-schema-manager tool from DCAE SDK.
StndDefined fields schemas are stored in etc/externalRepo directory.
Additional stndDefined related properties has been added to collector.properties.
VES version has been set to 1.7.3.
Issue-ID: DCAEGEN2-2254
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Signed-off-by: Michal Banka <michal.banka@nokia.com>
Change-Id: Iedaa3622b1d527f6794822c8867b9dfd1860bb8f
Diffstat (limited to 'src/test/java/org/onap/dcae/TLSTest.java')
-rw-r--r-- | src/test/java/org/onap/dcae/TLSTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/java/org/onap/dcae/TLSTest.java b/src/test/java/org/onap/dcae/TLSTest.java index e55b6052..424ddf8b 100644 --- a/src/test/java/org/onap/dcae/TLSTest.java +++ b/src/test/java/org/onap/dcae/TLSTest.java @@ -37,6 +37,11 @@ import static org.onap.dcae.TLSTest.HttpsConfigurationWithTLSAuthenticationAndBa public class TLSTest extends TLSTestBase { + private static final String MAPPING_FILE_LOCATION = "./etc/externalRepo/schema-map.json"; + private static final String SCHEMA_FILES_LOCATION = "./etc/externalRepo"; + private static final String STND_DEFINED_DATA_PATH = "/event/stndDefinedFields/data"; + private static final String SCHEMA_REF_PATH = "/event/stndDefinedFields/schemaReference"; + @Nested @Import(HttpConfiguration.class) class HttpTest extends TestClassBase { @@ -69,10 +74,16 @@ public class TLSTest extends TLSTestBase { // ApplicationSettings configurations static class HttpConfiguration extends TLSTestBase.ConfigurationBase { + @Override protected void configureSettings(ApplicationSettings settings) { when(settings.authMethod()).thenReturn(AuthMethodType.NO_AUTH.value()); when(settings.httpPort()).thenReturn(1111); + when(settings.getExternalSchemaMappingFileLocation()).thenReturn(MAPPING_FILE_LOCATION); + when(settings.getExternalSchemaSchemasLocation()).thenReturn(SCHEMA_FILES_LOCATION); + when(settings.getExternalSchemaSchemaRefPath()).thenReturn(SCHEMA_REF_PATH); + when(settings.getExternalSchemaStndDefinedDataPath()).thenReturn(STND_DEFINED_DATA_PATH); + } } @@ -89,6 +100,10 @@ public class TLSTest extends TLSTestBase { when(settings.truststorePasswordFileLocation()).thenReturn(TRUSTSTORE_PASSWORD_FILE.toString()); when(settings.certSubjectMatcher()).thenReturn(CERT_SUBJECT_MATCHER.toString()); when(settings.httpPort()).thenReturn(1111); + when(settings.getExternalSchemaMappingFileLocation()).thenReturn(MAPPING_FILE_LOCATION); + when(settings.getExternalSchemaSchemasLocation()).thenReturn(SCHEMA_FILES_LOCATION); + when(settings.getExternalSchemaSchemaRefPath()).thenReturn(SCHEMA_REF_PATH); + when(settings.getExternalSchemaStndDefinedDataPath()).thenReturn(STND_DEFINED_DATA_PATH); } } }
\ No newline at end of file |