From b956bdbf05c40eb82aa6e0751c9537864bf56394 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 1 Dec 2024 21:49:26 +0100 Subject: [PATCH] test(integration/http): add hurl scenario --- http_integration_tests/.gitignore | 1 - http_integration_tests/access_token_request.sh | 7 ------- http_integration_tests/authorize.sh | 15 --------------- http_integration_tests/get_user_info.sh | 5 ----- http_integration_tests/login.sh | 6 ------ http_integration_tests/oauth2c.sh | 10 ---------- http_integration_tests/register.sh | 6 ------ 7 files changed, 50 deletions(-) delete mode 100644 http_integration_tests/.gitignore delete mode 100755 http_integration_tests/access_token_request.sh delete mode 100755 http_integration_tests/authorize.sh delete mode 100755 http_integration_tests/get_user_info.sh delete mode 100755 http_integration_tests/login.sh delete mode 100755 http_integration_tests/oauth2c.sh delete mode 100755 http_integration_tests/register.sh diff --git a/http_integration_tests/.gitignore b/http_integration_tests/.gitignore deleted file mode 100644 index a9a5aec..0000000 --- a/http_integration_tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tmp diff --git a/http_integration_tests/access_token_request.sh b/http_integration_tests/access_token_request.sh deleted file mode 100755 index 5d7543f..0000000 --- a/http_integration_tests/access_token_request.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/sh - -curl -v http://localhost:8085/api/token \ - -u "a1785786-8be1-443c-9a6f-35feed703609":"49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \ - -d grant_type="authorization_code" \ - -d code="$(cat tmp/authorize_code.txt)" \ - -d redirect_uri="http://localhost:9090/authorize" > tmp/access_token.json diff --git a/http_integration_tests/authorize.sh b/http_integration_tests/authorize.sh deleted file mode 100755 index 615f570..0000000 --- a/http_integration_tests/authorize.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/sh - -curl -v http://localhost:8085/authorize \ - -G \ - -D "tmp/headers.txt" \ - --cookie "tmp/.curl-cookies" \ - -d client_id="a1785786-8be1-443c-9a6f-35feed703609" \ - -d response_type="code" \ - -d redirect_uri="http://localhost:9090/authorize" \ - -d scope="user_read_basic" \ - -d state="qxYAfk4kf6pbZkms78jM" - -code="$(cat tmp/headers.txt | grep -i "location" | awk -F ": " '{print $2}' | trurl -f - -g "{query:code}")" - -echo "$code" > tmp/authorize_code.txt diff --git a/http_integration_tests/get_user_info.sh b/http_integration_tests/get_user_info.sh deleted file mode 100755 index 437449f..0000000 --- a/http_integration_tests/get_user_info.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/sh - -curl -v http://localhost:8085/api/user \ - -u "a1785786-8be1-443c-9a6f-35feed703609":"49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \ - -H "Authorization: JWT $(jq -r .access_token tmp/access_token.json)" diff --git a/http_integration_tests/login.sh b/http_integration_tests/login.sh deleted file mode 100755 index 25916ac..0000000 --- a/http_integration_tests/login.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/sh - -curl -v http://localhost:8085/login \ - --cookie-jar "tmp/.curl-cookies" \ - -d login="test" \ - -d password="test" diff --git a/http_integration_tests/oauth2c.sh b/http_integration_tests/oauth2c.sh deleted file mode 100755 index 12069ce..0000000 --- a/http_integration_tests/oauth2c.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/bash - -oauth2c http://localhost:8085 \ - --client-id "a1785786-8be1-443c-9a6f-35feed703609" \ - --client-secret "49c6c16a-0a8a-4981-a60d-5cb96582cc1a" \ - --response-types code \ - --response-mode query \ - --grant-type authorization_code \ - --auth-method client_secret_basic \ - --scopes "user_read_basic" diff --git a/http_integration_tests/register.sh b/http_integration_tests/register.sh deleted file mode 100755 index c2a5f36..0000000 --- a/http_integration_tests/register.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/sh - -curl -v http://localhost:8085/register \ - -d email="test@example.org" \ - -d handle="test" \ - -d password="test"