From d00ae6aba5ee31db54acb0dd163871b504513f5a Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:21:40 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=E3=83=86=E3=82=B9=E3=83=88=E3=81=AESQL?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nature認証でフォロワーがfollowers投稿を取得できる.sql | 6 ++++-- ...Signature認証でフォロワーがpublic投稿を取得できる.sql | 6 ++++-- ...gnature認証でフォロワーがunlisted投稿を取得できる.sql | 6 ++++-- ...ア付き投稿はattachmentにDocumentとして画像が存在する.sql | 6 ++++-- .../リプライになっている投稿はinReplyToが存在する.sql | 9 ++++++--- .../note/匿名でfollowers投稿を取得しようとすると404.sql | 6 ++++-- .../resources/sql/note/匿名でpublic投稿を取得できる.sql | 6 ++++-- .../sql/note/匿名でunlisted投稿を取得できる.sql | 6 ++++-- src/intTest/resources/sql/test-post.sql | 5 +++-- 9 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがfollowers投稿を取得できる.sql b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがfollowers投稿を取得できる.sql index 4402e2a8..f522d4bc 100644 --- a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがfollowers投稿を取得できる.sql +++ b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがfollowers投稿を取得できる.sql @@ -21,6 +21,8 @@ insert into relationships (actor_id, target_actor_id, following, blocking, mutin ignore_follow_request) VALUES (9, 8, true, false, false, false, false); -insert into POSTS (ID, ACTOR_ID, OVERVIEW, TEXT, CREATED_AT, VISIBILITY, URL, REPLY_ID, REPOST_ID, SENSITIVE, AP_ID) -VALUES (1239, 8, null, 'test post', 12345680, 2, 'https://example.com/users/test-user8/posts/1239', null, null, false, +insert into POSTS (ID, ACTOR_ID, OVERVIEW, CONTENT, TEXT, CREATED_AT, VISIBILITY, URL, REPLY_ID, REPOST_ID, SENSITIVE, + AP_ID) +VALUES (1239, 8, null, '
test post
', 'test post', 12345680, 2, 'https://example.com/users/test-user8/posts/1239', + null, null, false, 'https://example.com/users/test-user8/posts/1239'); diff --git a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがpublic投稿を取得できる.sql b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがpublic投稿を取得できる.sql index bcd8c504..b0f688f2 100644 --- a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがpublic投稿を取得できる.sql +++ b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがpublic投稿を取得できる.sql @@ -21,7 +21,9 @@ insert into relationships (actor_id, target_actor_id, following, blocking, mutin ignore_follow_request) VALUES (5, 4, true, false, false, false, false); -insert into POSTS (ID, "actor_id", OVERVIEW, TEXT, "created_at", VISIBILITY, URL, "repost_id", "reply_id", SENSITIVE, +insert into POSTS (ID, "actor_id", OVERVIEW, CONTENT, TEXT, "created_at", VISIBILITY, URL, "repost_id", "reply_id", + SENSITIVE, AP_ID) -VALUES (1237, 4, null, 'test post', 12345680, 0, 'https://example.com/users/test-user4/posts/1237', null, null, false, +VALUES (1237, 4, null, 'test post
', 'test post', 12345680, 0, 'https://example.com/users/test-user4/posts/1237', + null, null, false, 'https://example.com/users/test-user4/posts/1237'); diff --git a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがunlisted投稿を取得できる.sql b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがunlisted投稿を取得できる.sql index 147ef378..4a271f1f 100644 --- a/src/intTest/resources/sql/note/httpSignature認証でフォロワーがunlisted投稿を取得できる.sql +++ b/src/intTest/resources/sql/note/httpSignature認証でフォロワーがunlisted投稿を取得できる.sql @@ -21,7 +21,9 @@ insert into relationships (actor_id, target_actor_id, following, blocking, mutin ignore_follow_request) VALUES (7, 6, true, false, false, false, false); -insert into POSTS (ID, "actor_ID", OVERVIEW, TEXT, "CREATED_AT", VISIBILITY, URL, "REPOST_ID", "REPLY_ID", SENSITIVE, +insert into POSTS (ID, "actor_ID", OVERVIEW, CONTENT, TEXT, "CREATED_AT", VISIBILITY, URL, "REPOST_ID", "REPLY_ID", + SENSITIVE, AP_ID) -VALUES (1238, 6, null, 'test post', 12345680, 1, 'https://example.com/users/test-user6/posts/1238', null, null, false, +VALUES (1238, 6, null, 'test post
', 'test post', 12345680, 1, 'https://example.com/users/test-user6/posts/1238', + null, null, false, 'https://example.com/users/test-user6/posts/1238'); diff --git a/src/intTest/resources/sql/note/メディア付き投稿はattachmentにDocumentとして画像が存在する.sql b/src/intTest/resources/sql/note/メディア付き投稿はattachmentにDocumentとして画像が存在する.sql index 8db9ac9e..b99b289f 100644 --- a/src/intTest/resources/sql/note/メディア付き投稿はattachmentにDocumentとして画像が存在する.sql +++ b/src/intTest/resources/sql/note/メディア付き投稿はattachmentにDocumentとして画像が存在する.sql @@ -9,9 +9,11 @@ VALUES (11, 'test-user11', 'example.com', 'Im test-user11.', 'THis account is te 'https://example.com/users/test-user11#pubkey', 'https://example.com/users/test-user11/following', 'https://example.com/users/test-user11/followers', null, false, 0, 0, 0, null); -insert into POSTS (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id, +insert into POSTS (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id, deleted) -VALUES (1242, 11, null, 'test post', 12345680, 0, 'https://example.com/users/test-user11/posts/1242', null, null, false, +VALUES (1242, 11, null, 'test post
', 'test post', 12345680, 0, + 'https://example.com/users/test-user11/posts/1242', null, null, false, 'https://example.com/users/test-user11/posts/1242', false); insert into MEDIA (ID, NAME, URL, REMOTE_URL, THUMBNAIL_URL, TYPE, BLURHASH, MIME_TYPE, DESCRIPTION) diff --git a/src/intTest/resources/sql/note/リプライになっている投稿はinReplyToが存在する.sql b/src/intTest/resources/sql/note/リプライになっている投稿はinReplyToが存在する.sql index cfc6da58..67178345 100644 --- a/src/intTest/resources/sql/note/リプライになっている投稿はinReplyToが存在する.sql +++ b/src/intTest/resources/sql/note/リプライになっている投稿はinReplyToが存在する.sql @@ -9,9 +9,12 @@ VALUES (10, 'test-user10', 'example.com', 'Im test-user10.', 'THis account is te 'https://example.com/users/test-user10#pubkey', 'https://example.com/users/test-user10/following', 'https://example.com/users/test-user10/followers', null, false, 0, 0, 0, null); -insert into POSTS (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id, +insert into POSTS (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id, deleted) -VALUES (1240, 10, null, 'test post', 12345680, 0, 'https://example.com/users/test-user10/posts/1240', null, null, false, +VALUES (1240, 10, null, 'test post
', 'test post', 12345680, 0, + 'https://example.com/users/test-user10/posts/1240', null, null, false, 'https://example.com/users/test-user10/posts/1240', false), - (1241, 10, null, 'test post', 12345680, 0, 'https://example.com/users/test-user10/posts/1241', null, 1240, false, + (1241, 10, null, 'test post
', 'test post', 12345680, 0, + 'https://example.com/users/test-user10/posts/1241', null, 1240, false, 'https://example.com/users/test-user10/posts/1241', false); diff --git a/src/intTest/resources/sql/note/匿名でfollowers投稿を取得しようとすると404.sql b/src/intTest/resources/sql/note/匿名でfollowers投稿を取得しようとすると404.sql index efae7a76..b848530c 100644 --- a/src/intTest/resources/sql/note/匿名でfollowers投稿を取得しようとすると404.sql +++ b/src/intTest/resources/sql/note/匿名でfollowers投稿を取得しようとすると404.sql @@ -9,7 +9,9 @@ VALUES (3, 'test-user3', 'example.com', 'Im test user3.', 'THis account is test 'https://example.com/users/test-user3#pubkey', 'https://example.com/users/test-user3/following', 'https://example.com/users/test-user3/followers', null, false, 0, 0, 0, null); -insert into POSTS (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id, +insert into POSTS (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id, deleted) -VALUES (1236, 3, null, 'test post', 12345680, 2, 'https://example.com/users/test-user3/posts/1236', null, null, false, +VALUES (1236, 3, null, 'test post
', 'test post', 12345680, 2, 'https://example.com/users/test-user3/posts/1236', + null, null, false, 'https://example.com/users/test-user3/posts/1236', false) diff --git a/src/intTest/resources/sql/note/匿名でpublic投稿を取得できる.sql b/src/intTest/resources/sql/note/匿名でpublic投稿を取得できる.sql index a9f3839e..0a3272b8 100644 --- a/src/intTest/resources/sql/note/匿名でpublic投稿を取得できる.sql +++ b/src/intTest/resources/sql/note/匿名でpublic投稿を取得できる.sql @@ -9,7 +9,9 @@ VALUES (1, 'test-user', 'example.com', 'Im test user.', 'THis account is test us 'https://example.com/users/test-user#pubkey', 'https://example.com/users/test-user/following', 'https://example.com/users/test-users/followers', null, false, 0, 0, 0, null); -insert into POSTS (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id, +insert into POSTS (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id, deleted) -VALUES (1234, 1, null, 'test post', 12345680, 0, 'https://example.com/users/test-user/posts/1234', null, null, false, +VALUES (1234, 1, null, 'test post
', 'test post', 12345680, 0, 'https://example.com/users/test-user/posts/1234', + null, null, false, 'https://example.com/users/test-user/posts/1234', false) diff --git a/src/intTest/resources/sql/note/匿名でunlisted投稿を取得できる.sql b/src/intTest/resources/sql/note/匿名でunlisted投稿を取得できる.sql index 6e2a63ff..abeb3150 100644 --- a/src/intTest/resources/sql/note/匿名でunlisted投稿を取得できる.sql +++ b/src/intTest/resources/sql/note/匿名でunlisted投稿を取得できる.sql @@ -9,7 +9,9 @@ VALUES (2, 'test-user2', 'example.com', 'Im test user2.', 'THis account is test 'https://example.com/users/test-user2#pubkey', 'https://example.com/users/test-user2/following', 'https://example.com/users/test-user2/followers', null, false, 0, 0, 0, null); -insert into POSTS (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id, +insert into POSTS (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id, deleted) -VALUES (1235, 2, null, 'test post', 12345680, 1, 'https://example.com/users/test-user2/posts/1235', null, null, false, +VALUES (1235, 2, null, 'test post
', 'test post', 12345680, 1, 'https://example.com/users/test-user2/posts/1235', + null, null, false, 'https://example.com/users/test-user2/posts/1235', false) diff --git a/src/intTest/resources/sql/test-post.sql b/src/intTest/resources/sql/test-post.sql index eefb3795..cd623188 100644 --- a/src/intTest/resources/sql/test-post.sql +++ b/src/intTest/resources/sql/test-post.sql @@ -1,3 +1,4 @@ -insert into posts (id, actor_id, overview, text, created_at, visibility, url, repost_id, reply_id, sensitive, ap_id) -VALUES (1, 1, null, 'hello', 1234455, 0, 'https://localhost/users/1/posts/1', null, null, false, +insert into posts (id, actor_id, overview, content, text, created_at, visibility, url, repost_id, reply_id, sensitive, + ap_id) +VALUES (1, 1, null, 'test post
', 'hello', 1234455, 0, 'https://localhost/users/1/posts/1', null, null, false, 'https://users/1/posts/1');