aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-test-utils/src
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2018-11-15 13:29:09 +0100
committerJakub Dudycz <jakub.dudycz@nokia.com>2018-11-19 09:29:35 +0100
commit33ff28e3fab91baa36e954c4fd167b615e94993c (patch)
tree33ed79a9d53e9457a18f9aa355962d6f89f95f5c /hv-collector-test-utils/src
parent3fdd2fe2b4f35e18998d050c632fc6de24a7e3b1 (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]+\.[0-9]+" Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-976 Change-Id: I2f9fd6f375ccca3255cc9e035918dc37cc97bd6a
Diffstat (limited to 'hv-collector-test-utils/src')
-rw-r--r--hv-collector-test-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/tests/utils/vesEvents.kt5
1 files changed, 3 insertions, 2 deletions
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..569f1a90 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.0.2"): CommonEventHeader =
CommonEventHeader.newBuilder()
.setVersion("sample-version")
.setDomain(domain.domainName)
@@ -63,7 +64,7 @@ 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 =