mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-09 07:23:39 +00:00
Backend: Add support for Announcement Description (#6493)
This commit is contained in:
parent
550b4645cf
commit
39df2a4845
@ -116,6 +116,10 @@
|
||||
"description": "Details about the announcement. This is only applicable if thread is of type announcement.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"description": "Announcement description in markdown format. See markdown support for more details.",
|
||||
"type": "string"
|
||||
},
|
||||
"startTime": {
|
||||
"description": "Timestamp of the start time from when the announcement should be shown.",
|
||||
"$ref": "../../type/basic.json#/definitions/timestamp"
|
||||
|
||||
@ -425,6 +425,7 @@ public class FeedResourceTest extends CatalogApplicationTest {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
AnnouncementDetails announcementDetails =
|
||||
new AnnouncementDetails()
|
||||
.withDescription("First announcement")
|
||||
.withStartTime(now.plusDays(1L).toEpochSecond(ZoneOffset.UTC))
|
||||
.withEndTime(now.plusDays(2L).toEpochSecond(ZoneOffset.UTC));
|
||||
CreateThread create =
|
||||
@ -455,6 +456,7 @@ public class FeedResourceTest extends CatalogApplicationTest {
|
||||
|
||||
// create one active announcement
|
||||
announcementDetails
|
||||
.withDescription("Active Announcement")
|
||||
.withStartTime(now.minusDays(2L).toEpochSecond(ZoneOffset.UTC))
|
||||
.withEndTime(now.plusDays(5L).toEpochSecond(ZoneOffset.UTC));
|
||||
create =
|
||||
@ -479,6 +481,7 @@ public class FeedResourceTest extends CatalogApplicationTest {
|
||||
|
||||
assertEquals(1, activeAnnouncementCount);
|
||||
assertEquals(1, announcements.getData().size());
|
||||
assertEquals("Active Announcement", announcements.getData().get(0).getAnnouncement().getDescription());
|
||||
|
||||
announcements = listAnnouncements(create.getAbout(), null, true, ADMIN_AUTH_HEADERS);
|
||||
assertEquals(activeAnnouncementCount, announcements.getPaging().getTotal());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user