<commit_before>#!/bin/bash
printf "\n\n======== POST User (Developer) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/user_d_registration.json" \
-X POST http://http://sp.int3.sonata-nfv.eu:5600/api/v2/register/user)
echo $resp

username=$(echo $resp | grep "username")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi

printf "\n\n======== POST User (Customer) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/user_c_registration.json" \
-X POST http://http://sp.int3.sonata-nfv.eu:5600/api/v2/register/user)
echo $resp

username=$(echo $resp | grep "username")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi

# printf "\n\n======== POST User (Developer+Customer) Registration form to GTKUSR ==\n\n\n"
# resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
# -d "@int-gtkusr-keycloak/resources/user_dc_registration.json" \
# -X POST http://http://sp.int3.sonata-nfv.eu:5600/api/v2/register/user)
# echo $resp

# username=$(echo $resp | grep "clientId")

# code=$(echo "$resp" | tail -n1)
# echo "Code: $code"

# if [[ $code != 201 ]] ;
#   then
#     echo "Error: Response error $code"
#     exit -1
# fi

printf "\n\n======== POST Service (Micro-service) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/service_registration.json" \
-X POST http://http://sp.int3.sonata-nfv.eu:5600/api/v2/register/service)
echo $resp

username=$(echo $resp | grep "clientId")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi<commit_msg>Fixing tests<commit_after>#!/bin/bash
printf "\n\n======== POST User (Developer) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/user_d_registration.json" \
-X POST http://sp.int3.sonata-nfv.eu:5600/api/v1/register/user)
echo $resp

username=$(echo $resp | grep "username")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi

printf "\n\n======== POST User (Customer) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/user_c_registration.json" \
-X POST http://sp.int3.sonata-nfv.eu:5600/api/v1/register/user)
echo $resp

username=$(echo $resp | grep "username")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi

# printf "\n\n======== POST User (Developer+Customer) Registration form to GTKUSR ==\n\n\n"
# resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
# -d "@int-gtkusr-keycloak/resources/user_dc_registration.json" \
# -X POST http://sp.int3.sonata-nfv.eu:5600/api/v1/register/user)
# echo $resp

# username=$(echo $resp | grep "clientId")

# code=$(echo "$resp" | tail -n1)
# echo "Code: $code"

# if [[ $code != 201 ]] ;
#   then
#     echo "Error: Response error $code"
#     exit -1
# fi

printf "\n\n======== POST Service (Micro-service) Registration form to GTKUSR ==\n\n\n"
resp=$(curl -qSfsw '\n%{http_code}' -H "Content-Type: application/json" \
-d "@int-gtkusr-keycloak/resources/service_registration.json" \
-X POST http://sp.int3.sonata-nfv.eu:5600/api/v1/register/service)
echo $resp

username=$(echo $resp | grep "clientId")

code=$(echo "$resp" | tail -n1)
echo "Code: $code"

if [[ $code != 201 ]] ;
  then
    echo "Error: Response error $code"
    exit -1
fi
{'fraction_non_alphanumeric': 0.20476787954830614, 'fraction_numerical': 0.022082810539523212, 'mean_word_length': 3.7908653846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2859359', 'n_tokens_mistral': 1643, 'n_tokens_neox': 1524, 'n_words': 370}