diff --git a/src/intTest/kotlin/mastodon/notifications/NotificationsTest.kt b/src/intTest/kotlin/mastodon/notifications/ExposedNotificationsApiPaginationTest.kt similarity index 97% rename from src/intTest/kotlin/mastodon/notifications/NotificationsTest.kt rename to src/intTest/kotlin/mastodon/notifications/ExposedNotificationsApiPaginationTest.kt index 282a9605..22fd7224 100644 --- a/src/intTest/kotlin/mastodon/notifications/NotificationsTest.kt +++ b/src/intTest/kotlin/mastodon/notifications/ExposedNotificationsApiPaginationTest.kt @@ -30,7 +30,8 @@ import org.springframework.web.context.WebApplicationContext @Sql("/sql/test-user.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) @Sql("/sql/test-user2.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) @Sql("/sql/notification/test-notifications.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) -class NotificationsTest { +@Sql("/sql/notification/test-mastodon_notifications.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_CLASS) +class ExposedNotificationsApiPaginationTest { @Autowired private lateinit var context: WebApplicationContext diff --git a/src/intTest/resources/application.yml b/src/intTest/resources/application.yml index 51622edd..da6769aa 100644 --- a/src/intTest/resources/application.yml +++ b/src/intTest/resources/application.yml @@ -24,7 +24,7 @@ spring: auto-index-creation: true host: localhost port: 27017 - database: hideout + database: hideout-integration-test h2: console: enabled: true diff --git a/src/intTest/resources/sql/notification/test-mastodon_notifications.sql b/src/intTest/resources/sql/notification/test-mastodon_notifications.sql new file mode 100644 index 00000000..c97a25a7 --- /dev/null +++ b/src/intTest/resources/sql/notification/test-mastodon_notifications.sql @@ -0,0 +1,66 @@ +insert into mastodon_notifications (id, user_id, type, created_at, account_id, status_id, report_id, relationship_serverance_event_id) +values (1, 1, 'follow', current_timestamp, 2, null, null, null), + (2, 1, 'follow', current_timestamp, 2, null, null, null), + (3, 1, 'follow', current_timestamp, 2, null, null, null), + (4, 1, 'follow', current_timestamp, 2, null, null, null), + (5, 1, 'follow', current_timestamp, 2, null, null, null), + (6, 1, 'follow', current_timestamp, 2, null, null, null), + (7, 1, 'follow', current_timestamp, 2, null, null, null), + (8, 1, 'follow', current_timestamp, 2, null, null, null), + (9, 1, 'follow', current_timestamp, 2, null, null, null), + (10, 1, 'follow', current_timestamp, 2, null, null, null), + (11, 1, 'follow', current_timestamp, 2, null, null, null), + (12, 1, 'follow', current_timestamp, 2, null, null, null), + (13, 1, 'follow', current_timestamp, 2, null, null, null), + (14, 1, 'follow', current_timestamp, 2, null, null, null), + (15, 1, 'follow', current_timestamp, 2, null, null, null), + (16, 1, 'follow', current_timestamp, 2, null, null, null), + (17, 1, 'follow', current_timestamp, 2, null, null, null), + (18, 1, 'follow', current_timestamp, 2, null, null, null), + (19, 1, 'follow', current_timestamp, 2, null, null, null), + (20, 1, 'follow', current_timestamp, 2, null, null, null), + (21, 1, 'follow', current_timestamp, 2, null, null, null), + (22, 1, 'follow', current_timestamp, 2, null, null, null), + (23, 1, 'follow', current_timestamp, 2, null, null, null), + (24, 1, 'follow', current_timestamp, 2, null, null, null), + (25, 1, 'follow', current_timestamp, 2, null, null, null), + (26, 1, 'follow', current_timestamp, 2, null, null, null), + (27, 1, 'follow', current_timestamp, 2, null, null, null), + (28, 1, 'follow', current_timestamp, 2, null, null, null), + (29, 1, 'follow', current_timestamp, 2, null, null, null), + (30, 1, 'follow', current_timestamp, 2, null, null, null), + (31, 1, 'follow', current_timestamp, 2, null, null, null), + (32, 1, 'follow', current_timestamp, 2, null, null, null), + (33, 1, 'follow', current_timestamp, 2, null, null, null), + (34, 1, 'follow', current_timestamp, 2, null, null, null), + (35, 1, 'follow', current_timestamp, 2, null, null, null), + (36, 1, 'follow', current_timestamp, 2, null, null, null), + (37, 1, 'follow', current_timestamp, 2, null, null, null), + (38, 1, 'follow', current_timestamp, 2, null, null, null), + (39, 1, 'follow', current_timestamp, 2, null, null, null), + (40, 1, 'follow', current_timestamp, 2, null, null, null), + (41, 1, 'follow', current_timestamp, 2, null, null, null), + (42, 1, 'follow', current_timestamp, 2, null, null, null), + (43, 1, 'follow', current_timestamp, 2, null, null, null), + (44, 1, 'follow', current_timestamp, 2, null, null, null), + (45, 1, 'follow', current_timestamp, 2, null, null, null), + (46, 1, 'follow', current_timestamp, 2, null, null, null), + (47, 1, 'follow', current_timestamp, 2, null, null, null), + (48, 1, 'follow', current_timestamp, 2, null, null, null), + (49, 1, 'follow', current_timestamp, 2, null, null, null), + (50, 1, 'follow', current_timestamp, 2, null, null, null), + (51, 1, 'follow', current_timestamp, 2, null, null, null), + (52, 1, 'follow', current_timestamp, 2, null, null, null), + (53, 1, 'follow', current_timestamp, 2, null, null, null), + (54, 1, 'follow', current_timestamp, 2, null, null, null), + (55, 1, 'follow', current_timestamp, 2, null, null, null), + (56, 1, 'follow', current_timestamp, 2, null, null, null), + (57, 1, 'follow', current_timestamp, 2, null, null, null), + (58, 1, 'follow', current_timestamp, 2, null, null, null), + (59, 1, 'follow', current_timestamp, 2, null, null, null), + (60, 1, 'follow', current_timestamp, 2, null, null, null), + (61, 1, 'follow', current_timestamp, 2, null, null, null), + (62, 1, 'follow', current_timestamp, 2, null, null, null), + (63, 1, 'follow', current_timestamp, 2, null, null, null), + (64, 1, 'follow', current_timestamp, 2, null, null, null), + (65, 1, 'follow', current_timestamp, 2, null, null, null); \ No newline at end of file diff --git a/src/intTest/resources/sql/notification/test-notifications.sql b/src/intTest/resources/sql/notification/test-notifications.sql index 99620742..38982603 100644 --- a/src/intTest/resources/sql/notification/test-notifications.sql +++ b/src/intTest/resources/sql/notification/test-notifications.sql @@ -63,71 +63,4 @@ VALUES (1, 'follow', 1, 2, null, null, null, current_timestamp), (62, 'follow', 1, 2, null, null, null, current_timestamp), (63, 'follow', 1, 2, null, null, null, current_timestamp), (64, 'follow', 1, 2, null, null, null, current_timestamp), - (65, 'follow', 1, 2, null, null, null, current_timestamp); - -insert into mastodon_notifications (id, user_id, type, created_at, account_id, status_id, report_id, relationship_serverance_event_id) -values (1, 1, 'follow', current_timestamp, 2, null, null, null), - (2, 1, 'follow', current_timestamp, 2, null, null, null), - (3, 1, 'follow', current_timestamp, 2, null, null, null), - (4, 1, 'follow', current_timestamp, 2, null, null, null), - (5, 1, 'follow', current_timestamp, 2, null, null, null), - (6, 1, 'follow', current_timestamp, 2, null, null, null), - (7, 1, 'follow', current_timestamp, 2, null, null, null), - (8, 1, 'follow', current_timestamp, 2, null, null, null), - (9, 1, 'follow', current_timestamp, 2, null, null, null), - (10, 1, 'follow', current_timestamp, 2, null, null, null), - (11, 1, 'follow', current_timestamp, 2, null, null, null), - (12, 1, 'follow', current_timestamp, 2, null, null, null), - (13, 1, 'follow', current_timestamp, 2, null, null, null), - (14, 1, 'follow', current_timestamp, 2, null, null, null), - (15, 1, 'follow', current_timestamp, 2, null, null, null), - (16, 1, 'follow', current_timestamp, 2, null, null, null), - (17, 1, 'follow', current_timestamp, 2, null, null, null), - (18, 1, 'follow', current_timestamp, 2, null, null, null), - (19, 1, 'follow', current_timestamp, 2, null, null, null), - (20, 1, 'follow', current_timestamp, 2, null, null, null), - (21, 1, 'follow', current_timestamp, 2, null, null, null), - (22, 1, 'follow', current_timestamp, 2, null, null, null), - (23, 1, 'follow', current_timestamp, 2, null, null, null), - (24, 1, 'follow', current_timestamp, 2, null, null, null), - (25, 1, 'follow', current_timestamp, 2, null, null, null), - (26, 1, 'follow', current_timestamp, 2, null, null, null), - (27, 1, 'follow', current_timestamp, 2, null, null, null), - (28, 1, 'follow', current_timestamp, 2, null, null, null), - (29, 1, 'follow', current_timestamp, 2, null, null, null), - (30, 1, 'follow', current_timestamp, 2, null, null, null), - (31, 1, 'follow', current_timestamp, 2, null, null, null), - (32, 1, 'follow', current_timestamp, 2, null, null, null), - (33, 1, 'follow', current_timestamp, 2, null, null, null), - (34, 1, 'follow', current_timestamp, 2, null, null, null), - (35, 1, 'follow', current_timestamp, 2, null, null, null), - (36, 1, 'follow', current_timestamp, 2, null, null, null), - (37, 1, 'follow', current_timestamp, 2, null, null, null), - (38, 1, 'follow', current_timestamp, 2, null, null, null), - (39, 1, 'follow', current_timestamp, 2, null, null, null), - (40, 1, 'follow', current_timestamp, 2, null, null, null), - (41, 1, 'follow', current_timestamp, 2, null, null, null), - (42, 1, 'follow', current_timestamp, 2, null, null, null), - (43, 1, 'follow', current_timestamp, 2, null, null, null), - (44, 1, 'follow', current_timestamp, 2, null, null, null), - (45, 1, 'follow', current_timestamp, 2, null, null, null), - (46, 1, 'follow', current_timestamp, 2, null, null, null), - (47, 1, 'follow', current_timestamp, 2, null, null, null), - (48, 1, 'follow', current_timestamp, 2, null, null, null), - (49, 1, 'follow', current_timestamp, 2, null, null, null), - (50, 1, 'follow', current_timestamp, 2, null, null, null), - (51, 1, 'follow', current_timestamp, 2, null, null, null), - (52, 1, 'follow', current_timestamp, 2, null, null, null), - (53, 1, 'follow', current_timestamp, 2, null, null, null), - (54, 1, 'follow', current_timestamp, 2, null, null, null), - (55, 1, 'follow', current_timestamp, 2, null, null, null), - (56, 1, 'follow', current_timestamp, 2, null, null, null), - (57, 1, 'follow', current_timestamp, 2, null, null, null), - (58, 1, 'follow', current_timestamp, 2, null, null, null), - (59, 1, 'follow', current_timestamp, 2, null, null, null), - (60, 1, 'follow', current_timestamp, 2, null, null, null), - (61, 1, 'follow', current_timestamp, 2, null, null, null), - (62, 1, 'follow', current_timestamp, 2, null, null, null), - (63, 1, 'follow', current_timestamp, 2, null, null, null), - (64, 1, 'follow', current_timestamp, 2, null, null, null), - (65, 1, 'follow', current_timestamp, 2, null, null, null); \ No newline at end of file + (65, 'follow', 1, 2, null, null, null, current_timestamp); \ No newline at end of file