From 8db6414556299a32343805942fc0233efd6dc6e6 Mon Sep 17 00:00:00 2001 From: Bruno Sakoto Date: Fri, 20 Aug 2021 18:59:14 -0400 Subject: Prepare for next event schema version Issue-ID: CPS-584, CPS-459 Signed-off-by: Bruno Sakoto Change-Id: Iaf605492783f8c06f40522a427ce63bd2d1b34d0 --- .../groovy/org/onap/cps/event/CpsDataUpdatedEventSpec.groovy | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'cps-events/src/test/groovy') diff --git a/cps-events/src/test/groovy/org/onap/cps/event/CpsDataUpdatedEventSpec.groovy b/cps-events/src/test/groovy/org/onap/cps/event/CpsDataUpdatedEventSpec.groovy index f72eceed1..545b18337 100644 --- a/cps-events/src/test/groovy/org/onap/cps/event/CpsDataUpdatedEventSpec.groovy +++ b/cps-events/src/test/groovy/org/onap/cps/event/CpsDataUpdatedEventSpec.groovy @@ -33,13 +33,13 @@ class CpsDataUpdatedEventSpec extends Specification { def objectMapper = new ObjectMapper() final DATASPACE_NAME = 'my-dataspace' - final BOOKSTORE_SCHEMA_SET = 'bootstore-schemaset' + final BOOKSTORE_SCHEMA_SET = 'bookstore-schemaset' final ANCHOR_NAME = 'chapters' final EVENT_TIMESTAMP = '2020-12-01T00:00:00.000+0000' final EVENT_ID = '77b8f114-4562-4069-8234-6d059ff742ac' final EVENT_SOURCE = new URI('urn:cps:org.onap.cps') final EVENT_TYPE = 'org.onap.cps.data-updated-event' - final EVENT_SCHEMA = 'urn:cps:org.onap.cps:data-updated-event-schema:1.1.0-SNAPSHOT' + final EVENT_SCHEMA = new URI('urn:cps:org.onap.cps:data-updated-event-schema:v1') final DATA = [ 'test:bookstore': [ @@ -67,7 +67,7 @@ class CpsDataUpdatedEventSpec extends Specification { then: 'CpsDataUpdatedEvent POJO has the excepted values' cpsDataUpdatedEvent.id == EVENT_ID cpsDataUpdatedEvent.source == EVENT_SOURCE - cpsDataUpdatedEvent.schema.value() == EVENT_SCHEMA + cpsDataUpdatedEvent.schema == EVENT_SCHEMA cpsDataUpdatedEvent.type == EVENT_TYPE def content = cpsDataUpdatedEvent.content content.observedTimestamp == EVENT_TIMESTAMP @@ -90,8 +90,7 @@ class CpsDataUpdatedEventSpec extends Specification { and: 'CpsDataUpdatedEvent with the content' def cpsDataUpdateEvent = new CpsDataUpdatedEvent() cpsDataUpdateEvent - .withSchema( - CpsDataUpdatedEvent.Schema.fromValue(EVENT_SCHEMA)) + .withSchema(EVENT_SCHEMA) .withId(EVENT_ID) .withSource(EVENT_SOURCE) .withType(EVENT_TYPE) @@ -111,4 +110,4 @@ class CpsDataUpdatedEventSpec extends Specification { ) } -} \ No newline at end of file +} -- cgit 1.2.3-korg