From 1617fe8f08ddbc6263fa52409300e9a4d7923c72 Mon Sep 17 00:00:00 2001 From: ez23re Date: Fri, 15 Nov 2024 17:10:24 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EC=8B=A4=ED=8C=A8=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- splanet-test.log | 137 ++++++++++++++++++ ...SubscriptionControllerAccecptanceTest.java | 99 ------------- 2 files changed, 137 insertions(+), 99 deletions(-) delete mode 100644 src/test/java/com/splanet/splanet/subscription/controller/SubscriptionControllerAccecptanceTest.java diff --git a/splanet-test.log b/splanet-test.log index f9ca94fa..062adc04 100644 --- a/splanet-test.log +++ b/splanet-test.log @@ -501,3 +501,140 @@ eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T03:2 eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T03:21:42.6644158, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T04:47:11.0257337, requestPath: /api/subscription/me/subscribe, headers: eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T04:47:11.5584523, requestPath: /api/subscription/me, headers: +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:04.3525038, requestPath: /api/comments/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:04.5925746, requestPath: /api/comments/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:04.9370311, requestPath: /api/comments, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.0651723, requestPath: /api/comments/2972, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.1473803, requestPath: /api/comments/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.2329065, requestPath: /api/comments/494, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.3316078, requestPath: /api/comments/2978, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.5482005, requestPath: /api/comments/497, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.6165904, requestPath: /api/comments, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:05.6911379, requestPath: /api/comments/499, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:08.2732699, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:08.4541354, requestPath: /api/plans/72, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:08.5215456, requestPath: /api/comments, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:08.7269952, requestPath: /api/friends/999/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:08.9179252, requestPath: /api/friends/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:09.0539965, requestPath: /api/friends/1/plans, headers: , statusCode: 403 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:09.4001091, requestPath: /api/friends/2992, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:09.6728624, requestPath: /api/friends, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:09.795121, requestPath: /api/friends/1, headers: , statusCode: 403 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:09.9119455, requestPath: /api/friends, headers: , statusCode: 403 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.2435562, requestPath: /api/friends/requests, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.3657386, requestPath: /api/friends/requests/220/accept, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.5770085, requestPath: /api/friends/requests, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.6785918, requestPath: /api/friends/requests/999/cancel, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.8016307, requestPath: /api/friends/requests/221/accept, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:11.8861339, requestPath: /api/friends/requests, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.0169359, requestPath: /api/friends/requests/222/cancel, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.0549265, requestPath: /api/friends/requests/sent, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.213969, requestPath: /api/friends/requests/223/cancel, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.3365467, requestPath: /api/friends/requests/224/reject, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.4480219, requestPath: /api/friends/requests, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.5587804, requestPath: /api/friends/requests/received, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:12.6758324, requestPath: /api/friends/requests/sent, headers: , statusCode: 200 +eventType: API_REQUEST, userId: 2, deviceId: apiTestDeviceId, timestamp: 2024-11-15T17:07:30.2764398, requestPath: /test/api, headers: User-Agent: ApiTestAgent, Accept: application/json, statusCode: 200 +eventType: LOGIN_SUCCESS, userId: 1, deviceId: testDeviceId, timestamp: 2024-11-15T17:07:30.2969587, requestPath: /test/login, headers: User-Agent: TestAgent, Accept: */* +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.0968159, requestPath: /api/payment/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.1927266, requestPath: /api/payment/81, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.2635231, requestPath: /api/payment/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.3556538, requestPath: /api/payment/83, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.9269201, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:31.9668595, requestPath: /api/plans/73, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.0003971, requestPath: /api/plans/73, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.1399056, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.1813748, requestPath: /api/plans/74, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.2737052, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.3170893, requestPath: /api/plans/75, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.3900761, requestPath: /api/plans/9999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.4827539, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.5664491, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.7165833, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.8333661, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:32.932623, requestPath: /api/plans/78, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.0114864, requestPath: /api/plans/9999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.0987084, requestPath: /api/plans/79, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.1774677, requestPath: /api/plans/80, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.2494281, requestPath: /api/plans/9999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.3546641, requestPath: /api/plans/9999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.4455613, requestPath: /api/plans/81, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.5217254, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.6076572, requestPath: /api/plans/82, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:33.680424, requestPath: /api/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:35.9349615, requestPath: /api/preview-plan/card, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.28967, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.3568694, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.405416, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.6211427, requestPath: /api/preview-plan/card/testDevice/testGroup/nonExistentCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.6917578, requestPath: /api/preview-plan/card, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.8257412, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:36.9996482, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:37.0877368, requestPath: /api/preview-plan/card/testDevice/testGroup/nonExistentCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:37.1571051, requestPath: /api/preview-plan/card/testDevice/testGroup/nonExistentCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:37.2480764, requestPath: /api/preview-plan/card/testDevice/testGroup/testCard, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:37.7357393, requestPath: /api/subscription/me/subscribe, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:37.8455771, requestPath: /api/subscription/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.0104502, requestPath: /api/subscription/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.1176329, requestPath: /api/subscription/me/subscribe, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.2020439, requestPath: /api/subscription/me/subscribe, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.3355225, requestPath: /api/subscriptions/me, headers: , statusCode: 403 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.7230241, requestPath: /api/teams, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.7889096, requestPath: /api/teams/445/invite, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:38.9805404, requestPath: /api/teams/invitation/112/response, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.0515774, requestPath: /api/teams/445/users/3043, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.2546522, requestPath: /api/teams/447/users/3046, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.4607675, requestPath: /api/teams/invitation/113/cancel, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.6513833, requestPath: /api/teams/449/users/3051, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.8013201, requestPath: /api/teams/999/users/3053, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:39.9310047, requestPath: /api/teams/451/invite, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.0823284, requestPath: /api/teams, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.2251726, requestPath: /api/teams/invitation/116/cancel, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.3284857, requestPath: /api/teams/454/invite, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.4842384, requestPath: /api/teams/invitation/117/response, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.5174145, requestPath: /api/teams/455/users/3064/role, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.6813622, requestPath: /api/teams/456/users/3066/role, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.8326978, requestPath: /api/teams/invitation/118/response, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:40.9282335, requestPath: /api/teams/458/members, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:41.1465969, requestPath: /api/teams/invitation/119/response, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:41.2662575, requestPath: /api/teams/460/users/3075, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:41.358994, requestPath: /api/teams, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.4850147, requestPath: /api/teams/463/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.5866649, requestPath: /api/teams/463/plans/93, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.6307769, requestPath: /api/teams/463/plans/93, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.6759786, requestPath: /api/teams/463/plans/93, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.7973946, requestPath: /api/teams/464/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.8632708, requestPath: /api/teams/464/plans/94, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:42.9796531, requestPath: /api/teams/465/plans/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.0931441, requestPath: /api/teams/466/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.196998, requestPath: /api/teams/467/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.4025768, requestPath: /api/teams/468/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.527938, requestPath: /api/teams/469/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.5877644, requestPath: /api/teams/469/plans/96, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.6354635, requestPath: /api/teams/469/plans/96, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.771767, requestPath: /api/teams/470/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:43.83869, requestPath: /api/teams/470/plans/97, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:44.0196828, requestPath: /api/teams/471/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:44.1072861, requestPath: /api/teams/471/plans/98, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:44.2196268, requestPath: /api/teams/472/plans/999, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:44.3740273, requestPath: /api/teams/473/plans, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:44.4181317, requestPath: /api/teams/473/plans/99, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.5868105, requestPath: /api/users/create, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.6360044, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.6655077, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.7073613, requestPath: /api/users/create, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.7413258, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.7593258, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.7773184, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.8245317, requestPath: /api/users/create, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.8567233, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:45.9109411, requestPath: /api/users/create, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.0744951, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.132446, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.1929832, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.2503497, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.307734, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.3537151, requestPath: /api/users/create, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:07:46.4144152, requestPath: /api/users/me, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:09:54.8532772, requestPath: /api/subscription/me/subscribe, headers: , statusCode: 200 +eventType: API_REQUEST, userId: null, deviceId: null, timestamp: 2024-11-15T17:09:55.5302762, requestPath: /api/subscription/me, headers: , statusCode: 200 diff --git a/src/test/java/com/splanet/splanet/subscription/controller/SubscriptionControllerAccecptanceTest.java b/src/test/java/com/splanet/splanet/subscription/controller/SubscriptionControllerAccecptanceTest.java deleted file mode 100644 index 944f0244..00000000 --- a/src/test/java/com/splanet/splanet/subscription/controller/SubscriptionControllerAccecptanceTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.splanet.splanet.subscription.controller; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.splanet.splanet.core.exception.ErrorCode; -import com.splanet.splanet.subscription.dto.SubscriptionRequest; -import com.splanet.splanet.subscription.entity.Subscription; -import com.splanet.splanet.subscription.repository.SubscriptionRepository; -import com.splanet.splanet.user.entity.User; -import com.splanet.splanet.user.repository.UserRepository; -import com.splanet.splanet.jwt.JwtTokenProvider; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDateTime; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; - -@SpringBootTest -@AutoConfigureMockMvc -@Transactional -class SubscriptionControllerAccecptanceTest { - - @Autowired - private MockMvc mockMvc; - - @Autowired - private UserRepository userRepository; - - @Autowired - private SubscriptionRepository subscriptionRepository; - - @Autowired - private JwtTokenProvider jwtTokenProvider; - - private String token; - private User testUser; - - @BeforeEach - void setUp() { - testUser = User.builder() - .nickname("구독 테스트 사용자") - .profileImage("http://example.com/profile.jpg") - .kakaoId(123456789L) - .isPremium(false) - .build(); - userRepository.save(testUser); - - token = "Bearer " + jwtTokenProvider.createAccessToken(testUser.getId()); - } - - @Test - void 구독_생성후_조회() throws Exception { - SubscriptionRequest request = new SubscriptionRequest(); - request.setType(Subscription.Type.MONTHLY); - - mockMvc.perform(post("/api/subscription/me/subscribe") - .header("Authorization", token) - .contentType(MediaType.APPLICATION_JSON) - .content(new ObjectMapper().writeValueAsString(request))) - .andExpect(status().isOk()) - .andExpect(jsonPath("$.message").value("구독이 성공적으로 완료되었습니다.")) - .andExpect(jsonPath("$.subscription.id").exists()) - .andExpect(jsonPath("$.subscription.startDate").exists()) - .andExpect(jsonPath("$.subscription.endDate").doesNotExist()); - - Subscription newSubscription = subscriptionRepository.findTopByUserIdAndStatusOrderByStartDateDesc(testUser.getId(), Subscription.Status.ACTIVE) - .orElseThrow(() -> new AssertionError("구독 정보가 저장되지 않았습니다.")); - - assertThat(newSubscription.getType()).isEqualTo(request.getType()); - assertThat(newSubscription.getStatus()).isEqualTo(Subscription.Status.ACTIVE); - - Subscription subscription = Subscription.builder() - .user(testUser) - .type(Subscription.Type.MONTHLY) - .startDate(LocalDateTime.now()) - .endDate(LocalDateTime.now().plusMonths(1)) - .build(); - subscriptionRepository.save(subscription); - - mockMvc.perform(get("/api/subscription/me") - .header("Authorization", token) - .contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(jsonPath("$.message").value("구독 정보가 성공적으로 조회되었습니다.")) - .andExpect(jsonPath("$.subscription.id").exists()) - .andExpect(jsonPath("$.subscription.startDate").exists()) - .andExpect(jsonPath("$.subscription.endDate").exists()); - } -}