mirror of https://github.com/usbharu/Hideout.git
test: テストを修正
This commit is contained in:
parent
c05ea300f7
commit
8b6182c6e7
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (8, 'test-user8', 'example.com', 'Im test-user8.', 'THis account is test-user8.',
|
VALUES (8, 'test-user8', 'example.com', 'Im test-user8.', 'THis account is test-user8.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user8/inbox',
|
'https://example.com/users/test-user8/inbox',
|
||||||
|
@ -7,10 +7,10 @@ VALUES (8, 'test-user8', 'example.com', 'Im test-user8.', 'THis account is test-
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user8#pubkey', 'https://example.com/users/test-user8/following',
|
'https://example.com/users/test-user8#pubkey', 'https://example.com/users/test-user8/following',
|
||||||
'https://example.com/users/test-user8/followers');
|
'https://example.com/users/test-user8/followers', null);
|
||||||
|
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (9, 'test-user9', 'follower.example.com', 'Im test-user9.', 'THis account is test-user9.',
|
VALUES (9, 'test-user9', 'follower.example.com', 'Im test-user9.', 'THis account is test-user9.',
|
||||||
null,
|
null,
|
||||||
'https://follower.example.com/users/test-user9/inbox',
|
'https://follower.example.com/users/test-user9/inbox',
|
||||||
|
@ -19,7 +19,7 @@ VALUES (9, 'test-user9', 'follower.example.com', 'Im test-user9.', 'THis account
|
||||||
null, 12345678,
|
null, 12345678,
|
||||||
'https://follower.example.com/users/test-user9#pubkey',
|
'https://follower.example.com/users/test-user9#pubkey',
|
||||||
'https://follower.example.com/users/test-user9/following',
|
'https://follower.example.com/users/test-user9/following',
|
||||||
'https://follower.example.com/users/test-user9/followers');
|
'https://follower.example.com/users/test-user9/followers', null);
|
||||||
|
|
||||||
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
||||||
VALUES (8, 9);
|
VALUES (8, 9);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (4, 'test-user4', 'example.com', 'Im test user4.', 'THis account is test user4.',
|
VALUES (4, 'test-user4', 'example.com', 'Im test user4.', 'THis account is test user4.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user4/inbox',
|
'https://example.com/users/test-user4/inbox',
|
||||||
|
@ -7,10 +7,10 @@ VALUES (4, 'test-user4', 'example.com', 'Im test user4.', 'THis account is test
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user4#pubkey', 'https://example.com/users/test-user4/following',
|
'https://example.com/users/test-user4#pubkey', 'https://example.com/users/test-user4/following',
|
||||||
'https://example.com/users/test-user4/followers');
|
'https://example.com/users/test-user4/followers', null);
|
||||||
|
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (5, 'test-user5', 'follower.example.com', 'Im test user5.', 'THis account is test user5.',
|
VALUES (5, 'test-user5', 'follower.example.com', 'Im test user5.', 'THis account is test user5.',
|
||||||
null,
|
null,
|
||||||
'https://follower.example.com/users/test-user5/inbox',
|
'https://follower.example.com/users/test-user5/inbox',
|
||||||
|
@ -19,7 +19,7 @@ VALUES (5, 'test-user5', 'follower.example.com', 'Im test user5.', 'THis account
|
||||||
null, 12345678,
|
null, 12345678,
|
||||||
'https://follower.example.com/users/test-user5#pubkey',
|
'https://follower.example.com/users/test-user5#pubkey',
|
||||||
'https://follower.example.com/users/test-user5/following',
|
'https://follower.example.com/users/test-user5/following',
|
||||||
'https://follower.example.com/users/test-user5/followers');
|
'https://follower.example.com/users/test-user5/followers', null);
|
||||||
|
|
||||||
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
||||||
VALUES (4, 5);
|
VALUES (4, 5);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (6, 'test-user6', 'example.com', 'Im test-user6.', 'THis account is test-user6.',
|
VALUES (6, 'test-user6', 'example.com', 'Im test-user6.', 'THis account is test-user6.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user6/inbox',
|
'https://example.com/users/test-user6/inbox',
|
||||||
|
@ -7,10 +7,10 @@ VALUES (6, 'test-user6', 'example.com', 'Im test-user6.', 'THis account is test-
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user6#pubkey', 'https://example.com/users/test-user6/following',
|
'https://example.com/users/test-user6#pubkey', 'https://example.com/users/test-user6/following',
|
||||||
'https://example.com/users/test-user6/followers');
|
'https://example.com/users/test-user6/followers', null);
|
||||||
|
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (7, 'test-user7', 'follower.example.com', 'Im test-user7.', 'THis account is test-user7.',
|
VALUES (7, 'test-user7', 'follower.example.com', 'Im test-user7.', 'THis account is test-user7.',
|
||||||
null,
|
null,
|
||||||
'https://follower.example.com/users/test-user7/inbox',
|
'https://follower.example.com/users/test-user7/inbox',
|
||||||
|
@ -19,7 +19,7 @@ VALUES (7, 'test-user7', 'follower.example.com', 'Im test-user7.', 'THis account
|
||||||
null, 12345678,
|
null, 12345678,
|
||||||
'https://follower.example.com/users/test-user7#pubkey',
|
'https://follower.example.com/users/test-user7#pubkey',
|
||||||
'https://follower.example.com/users/test-user7/following',
|
'https://follower.example.com/users/test-user7/following',
|
||||||
'https://follower.example.com/users/test-user7/followers');
|
'https://follower.example.com/users/test-user7/followers', null);
|
||||||
|
|
||||||
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
insert into USERS_FOLLOWERS (USER_ID, FOLLOWER_ID)
|
||||||
VALUES (6, 7);
|
VALUES (6, 7);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (11, 'test-user11', 'example.com', 'Im test-user11.', 'THis account is test-user11.',
|
VALUES (11, 'test-user11', 'example.com', 'Im test-user11.', 'THis account is test-user11.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user11/inbox',
|
'https://example.com/users/test-user11/inbox',
|
||||||
|
@ -7,7 +7,7 @@ VALUES (11, 'test-user11', 'example.com', 'Im test-user11.', 'THis account is te
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user11#pubkey', 'https://example.com/users/test-user11/following',
|
'https://example.com/users/test-user11#pubkey', 'https://example.com/users/test-user11/following',
|
||||||
'https://example.com/users/test-user11/followers');
|
'https://example.com/users/test-user11/followers', null);
|
||||||
|
|
||||||
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
||||||
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', 12345680, 0, 'https://example.com/users/test-user11/posts/1242', null, null, false,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (10, 'test-user10', 'example.com', 'Im test-user10.', 'THis account is test-user10.',
|
VALUES (10, 'test-user10', 'example.com', 'Im test-user10.', 'THis account is test-user10.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user10/inbox',
|
'https://example.com/users/test-user10/inbox',
|
||||||
|
@ -7,7 +7,7 @@ VALUES (10, 'test-user10', 'example.com', 'Im test-user10.', 'THis account is te
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user10#pubkey', 'https://example.com/users/test-user10/following',
|
'https://example.com/users/test-user10#pubkey', 'https://example.com/users/test-user10/following',
|
||||||
'https://example.com/users/test-user10/followers');
|
'https://example.com/users/test-user10/followers', null);
|
||||||
|
|
||||||
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
||||||
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', 12345680, 0, 'https://example.com/users/test-user10/posts/1240', null, null, false,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (3, 'test-user3', 'example.com', 'Im test user3.', 'THis account is test user3.',
|
VALUES (3, 'test-user3', 'example.com', 'Im test user3.', 'THis account is test user3.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user3/inbox',
|
'https://example.com/users/test-user3/inbox',
|
||||||
|
@ -7,7 +7,7 @@ VALUES (3, 'test-user3', 'example.com', 'Im test user3.', 'THis account is test
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user3#pubkey', 'https://example.com/users/test-user3/following',
|
'https://example.com/users/test-user3#pubkey', 'https://example.com/users/test-user3/following',
|
||||||
'https://example.com/users/test-user3/followers');
|
'https://example.com/users/test-user3/followers', null);
|
||||||
|
|
||||||
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
||||||
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', 12345680, 2, 'https://example.com/users/test-user3/posts/1236', null, null, false,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (1, 'test-user', 'example.com', 'Im test user.', 'THis account is test user.',
|
VALUES (1, 'test-user', 'example.com', 'Im test user.', 'THis account is test user.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'https://example.com/users/test-user/inbox',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'https://example.com/users/test-user/inbox',
|
||||||
'https://example.com/users/test-user/outbox', 'https://example.com/users/test-user',
|
'https://example.com/users/test-user/outbox', 'https://example.com/users/test-user',
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user#pubkey', 'https://example.com/users/test-user/following',
|
'https://example.com/users/test-user#pubkey', 'https://example.com/users/test-user/following',
|
||||||
'https://example.com/users/test-users/followers');
|
'https://example.com/users/test-users/followers', null);
|
||||||
|
|
||||||
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
||||||
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', 12345680, 0, 'https://example.com/users/test-user/posts/1234', null, null, false,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (2, 'test-user2', 'example.com', 'Im test user2.', 'THis account is test user2.',
|
VALUES (2, 'test-user2', 'example.com', 'Im test user2.', 'THis account is test user2.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8',
|
||||||
'https://example.com/users/test-user2/inbox',
|
'https://example.com/users/test-user2/inbox',
|
||||||
|
@ -7,7 +7,7 @@ VALUES (2, 'test-user2', 'example.com', 'Im test user2.', 'THis account is test
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user2#pubkey', 'https://example.com/users/test-user2/following',
|
'https://example.com/users/test-user2#pubkey', 'https://example.com/users/test-user2/following',
|
||||||
'https://example.com/users/test-user2/followers');
|
'https://example.com/users/test-user2/followers', null);
|
||||||
|
|
||||||
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
insert into POSTS (ID, "userId", OVERVIEW, TEXT, "createdAt", VISIBILITY, URL, "repostId", "replyId", SENSITIVE, AP_ID)
|
||||||
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', 12345680, 1, 'https://example.com/users/test-user2/posts/1235', null, null, false,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
insert into "USERS" (ID, NAME, DOMAIN, SCREEN_NAME, DESCRIPTION, PASSWORD, INBOX, OUTBOX, URL, PUBLIC_KEY, PRIVATE_KEY,
|
||||||
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS)
|
CREATED_AT, KEY_ID, FOLLOWING, FOLLOWERS, INSTANCE)
|
||||||
VALUES (1, 'test-user', 'example.com', 'Im test user.', 'THis account is test user.',
|
VALUES (1, 'test-user', 'example.com', 'Im test user.', 'THis account is test user.',
|
||||||
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'https://example.com/users/test-user/inbox',
|
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'https://example.com/users/test-user/inbox',
|
||||||
'https://example.com/users/test-user/outbox', 'https://example.com/users/test-user',
|
'https://example.com/users/test-user/outbox', 'https://example.com/users/test-user',
|
||||||
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
'-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----',
|
||||||
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
'-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----', 12345678,
|
||||||
'https://example.com/users/test-user#pubkey', 'https://example.com/users/test-user/following',
|
'https://example.com/users/test-user#pubkey', 'https://example.com/users/test-user/following',
|
||||||
'https://example.com/users/test-users/followers');
|
'https://example.com/users/test-users/followers', null);
|
||||||
|
|
|
@ -88,4 +88,6 @@ object Instance : Table("instance") {
|
||||||
val isMuted = bool("is_muted")
|
val isMuted = bool("is_muted")
|
||||||
val moderationNote = varchar("moderation_note", 10000)
|
val moderationNote = varchar("moderation_note", 10000)
|
||||||
val createdAt = timestamp("created_at")
|
val createdAt = timestamp("created_at")
|
||||||
|
|
||||||
|
override val primaryKey: PrimaryKey = PrimaryKey(id)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dev.usbharu.hideout.activitypub.service.common
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.core.domain.model.user.UserRepository
|
import dev.usbharu.hideout.core.domain.model.user.UserRepository
|
||||||
|
import dev.usbharu.hideout.core.service.resource.InMemoryCacheManager
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
|
|
|
@ -41,6 +41,7 @@ class UserServiceTest {
|
||||||
mock(),
|
mock(),
|
||||||
userBuilder,
|
userBuilder,
|
||||||
testApplicationConfig,
|
testApplicationConfig,
|
||||||
|
mock()
|
||||||
)
|
)
|
||||||
userService.createLocalUser(UserCreateDto("test", "testUser", "XXXXXXXXXXXXX", "test"))
|
userService.createLocalUser(UserCreateDto("test", "testUser", "XXXXXXXXXXXXX", "test"))
|
||||||
verify(userRepository, times(1)).save(any())
|
verify(userRepository, times(1)).save(any())
|
||||||
|
@ -67,7 +68,7 @@ class UserServiceTest {
|
||||||
onBlocking { nextId() } doReturn 113345L
|
onBlocking { nextId() } doReturn 113345L
|
||||||
}
|
}
|
||||||
val userService =
|
val userService =
|
||||||
UserServiceImpl(userRepository, mock(), mock(), mock(), mock(), userBuilder, testApplicationConfig)
|
UserServiceImpl(userRepository, mock(), mock(), mock(), mock(), userBuilder, testApplicationConfig, mock())
|
||||||
val user = RemoteUserCreateDto(
|
val user = RemoteUserCreateDto(
|
||||||
name = "test",
|
name = "test",
|
||||||
domain = "remote.example.com",
|
domain = "remote.example.com",
|
||||||
|
@ -79,7 +80,8 @@ class UserServiceTest {
|
||||||
publicKey = "-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----",
|
publicKey = "-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----",
|
||||||
keyId = "a",
|
keyId = "a",
|
||||||
following = "",
|
following = "",
|
||||||
followers = ""
|
followers = "",
|
||||||
|
sharedInbox = null
|
||||||
)
|
)
|
||||||
userService.createRemoteUser(user)
|
userService.createRemoteUser(user)
|
||||||
verify(userRepository, times(1)).save(any())
|
verify(userRepository, times(1)).save(any())
|
||||||
|
|
Loading…
Reference in New Issue