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