aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-test-utils
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2018-11-15 13:45:44 +0100
committerJakub Dudycz <jakub.dudycz@nokia.com>2018-11-27 09:42:57 +0100
commit4aa75b58a490b07ccff713f4c1548a2a755904ef (patch)
treee42ec47c1f65dba14932c241028717c192c6cfe8 /hv-collector-test-utils
parent0573df820926986dd19ac9a82943bd5b5eda450d (diff)
Fix Common Event Header fields validation
- "sequence" is no longer a required parameter, since deafult value "0" is acceptable - "vesEventListenerVersion" has to match the regular expression "7\.[0-9].*" Change-Id: I784f13c0a35a25beca29f4ae756df3586ddddd5b Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-976
Diffstat (limited to 'hv-collector-test-utils')
-rw-r--r--hv-collector-test-utils/pom.xml2
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt7
2 files changed, 5 insertions, 4 deletions
diff --git a/hv-collector-test-utils/pom.xml b/hv-collector-test-utils/pom.xml
index 063cf7e1..c751fc3a 100644
--- a/hv-collector-test-utils/pom.xml
+++ b/hv-collector-test-utils/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
<artifactId>ves-hv-collector</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
diff --git a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
index 20d0c50f..f3a12ca1 100644
--- a/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
+++ b/hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt
@@ -44,7 +44,8 @@ fun vesEvent(commonEventHeader: CommonEventHeader,
fun commonHeader(domain: VesEventDomain = PERF3GPP,
id: String = randomUUID().toString(),
- priority: Priority = Priority.NORMAL): CommonEventHeader =
+ priority: Priority = Priority.NORMAL,
+ vesEventListenerVersion: String = "7.2"): CommonEventHeader =
CommonEventHeader.newBuilder()
.setVersion("sample-version")
.setDomain(domain.domainName)
@@ -63,10 +64,10 @@ fun commonHeader(domain: VesEventDomain = PERF3GPP,
.setSourceId(ByteString.copyFromUtf8("sample-source-id"))
.setSourceName("sample-source-name")
.setTimeZoneOffset("+1")
- .setVesEventListenerVersion("another-version")
+ .setVesEventListenerVersion(vesEventListenerVersion)
.build()
fun vesEventBytes(commonHeader: CommonEventHeader, byteString: ByteString = ByteString.EMPTY): ByteData =
vesEvent(commonHeader, byteString).toByteData()
-fun MessageLite.toByteData(): ByteData = ByteData(toByteArray()) \ No newline at end of file
+fun MessageLite.toByteData(): ByteData = ByteData(toByteArray())