From 8bd63a1a1373ad718a5857d4191702ce4889299c Mon Sep 17 00:00:00 2001 From: devxb Date: Thu, 22 Feb 2024 19:23:05 +0900 Subject: [PATCH] =?UTF-8?q?test:=20target=5Fid=20=EB=B0=98=ED=99=98?= =?UTF-8?q?=EC=9D=B4=20=EC=97=86=EB=8A=94=EA=B3=B3=EC=97=90=EC=84=9C=20Cap?= =?UTF-8?q?ture=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/JwtDecryptInterceptor.java | 2 + support/e2e/v1_6.find_galery_preview.hurl | 44 ++----------------- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/auth/auth-interceptor/src/main/java/me/nalab/auth/interceptor/JwtDecryptInterceptor.java b/auth/auth-interceptor/src/main/java/me/nalab/auth/interceptor/JwtDecryptInterceptor.java index 4604ad64..c0ef1f05 100644 --- a/auth/auth-interceptor/src/main/java/me/nalab/auth/interceptor/JwtDecryptInterceptor.java +++ b/auth/auth-interceptor/src/main/java/me/nalab/auth/interceptor/JwtDecryptInterceptor.java @@ -30,7 +30,9 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons if (!isExcludedURI(request)) { String token = request.getHeader("Authorization"); throwIfCannotValidToken(token); + System.out.println(">>> " + token); Long targetId = targetIdGetPort.getTargetId(token.split(" ")[1]); + System.out.println(">>> " + targetId); request.setAttribute("logined", targetId); } return true; diff --git a/support/e2e/v1_6.find_galery_preview.hurl b/support/e2e/v1_6.find_galery_preview.hurl index 0bf0889c..97a90522 100644 --- a/support/e2e/v1_6.find_galery_preview.hurl +++ b/support/e2e/v1_6.find_galery_preview.hurl @@ -1,7 +1,7 @@ POST http://nalab-server:8080/v1/oauth/default # Default provider를 통해서 로그인 진행 { - "nickname": "devxb", - "email": "hello@12345" + "nickname": "find_gallery", + "email": "hello@1234567" } HTTP 200 @@ -60,42 +60,6 @@ jsonpath "$.survey_id" exists [Captures] survey_id: jsonpath "$.survey_id" -target_id: jsonpath "$.target.id" - -########## - -GET http://nalab-server:8080/v1/surveys/{{ survey_id }} # 생성된 survey를 조회한다. - -HTTP 200 -[Asserts] -header "Content-type" == "application/json" - -jsonpath "$.survey_id" exists - -jsonpath "$.target.id" exists -jsonpath "$.target.nickname" == "devxb" - -jsonpath "$.question_count" == 2 -jsonpath "$.question.[0].question_id" exists -jsonpath "$.question.[0].type" == "choice" -jsonpath "$.question.[0].form_type" == "tendency" -jsonpath "$.question.[0].title" == "저는 UI, UI, GUI 중에 어떤 분야를 가장 잘하는 것 같나요?" -jsonpath "$.question.[0].order" == 1 -jsonpath "$.question.[0].max_selectable_count" == 1 -jsonpath "$.question.[0].choices.[0].choice_id" exists -jsonpath "$.question.[0].choices.[0].content" == "UI" -jsonpath "$.question.[0].choices.[0].order" == 1 -jsonpath "$.question.[0].choices.[1].choice_id" exists -jsonpath "$.question.[0].choices.[1].content" == "UX" -jsonpath "$.question.[0].choices.[1].order" == 2 -jsonpath "$.question.[0].choices.[2].choice_id" exists -jsonpath "$.question.[0].choices.[2].content" == "GUI" -jsonpath "$.question.[0].choices.[2].order" == 3 -jsonpath "$.question.[1].question_id" exists -jsonpath "$.question.[1].type" == "short" -jsonpath "$.question.[1].form_type" == "strength" -jsonpath "$.question.[1].title" == "저는 UX, UI, GUI 중에 어떤 분야에 더 강점이 있나요?" -jsonpath "$.question.[1].order" == 2 ########## @@ -152,8 +116,8 @@ HTTP 200 [Asserts] header "Content-type" == "application/json" -jsonpath "$.target.target_id" == {{ target_id }} -jsonpath "$.target.nickname" == "devxb" +jsonpath "$.target.target_id" exists +jsonpath "$.target.nickname" == "find_gallery" jsonpath "$.target.position" == null jsonpath "$.target.job" == "OTHER" jsonpath "$.target.image_url" == "empty_image"