From 1f6697c1769b6d33960c3ae047c81ab317a98696 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Tue, 20 Aug 2024 11:01:08 +0800 Subject: [PATCH] test Signed-off-by: Yang Chiu --- .github/workflows/qase-sync.yaml | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/qase-sync.yaml b/.github/workflows/qase-sync.yaml index e84000407d..14dd0a89ba 100644 --- a/.github/workflows/qase-sync.yaml +++ b/.github/workflows/qase-sync.yaml @@ -75,12 +75,12 @@ jobs: # if not, create new test suite if [[ $(echo "$res" | jq .result.count) == "0" ]]; then echo "creating new test suite ${str} with parent id ${parent_suite_id}" - res=$(curl --request POST -s \ - --url https://api.qase.io/v1/suite/LH \ - --header "Token: ${token}" \ - --header "accept: application/json" \ - --header "content-type: application/json" \ - --data "{ \"title\": \"${str}\", \"parent_id\": \"${parent_suite_id}\" }") + #res=$(curl --request POST -s \ + # --url https://api.qase.io/v1/suite/LH \ + # --header "Token: ${token}" \ + # --header "accept: application/json" \ + # --header "content-type: application/json" \ + # --data "{ \"title\": \"${str}\", \"parent_id\": \"${parent_suite_id}\" }") echo "created new test suite ${str}: ${res}" fi @@ -107,16 +107,16 @@ jobs: description=$(sed -z 's/\n/\\n/g' ${file_path} | sed 's/ \\/ \\\\/g') echo "got test case description: ${description}" - res=$(curl -f -s --request GET --url "https://api.qase.io/v1/case/LH" --data-urlencode "search=${title}" --header "Token: ${token}" --header "accept: application/json") + res=$(curl -s --request GET --url "https://api.qase.io/v1/case/LH" --data-urlencode "search=${title}" --header "Token: ${token}" --header "accept: application/json") if [[ "$(echo $res | jq .result.count) == "1" ]]; then # update existing test case test_case_id=$(echo $res | jq .result.entities[0].id) - res=$(curl --request PATCH -s -f \ - --url "https://api.qase.io/v1/case/LH/${test_case_id}" \ - --header "Token: ${token}" \ - --header "accept: application/json" \ - --header "content-type: application/json" \ - --data "{ \"description\": \"${description}\", \"title\": "${title}" }") + #res=$(curl --request PATCH -s \ + # --url "https://api.qase.io/v1/case/LH/${test_case_id}" \ + # --header "Token: ${token}" \ + # --header "accept: application/json" \ + # --header "content-type: application/json" \ + # --data "{ \"description\": \"${description}\", \"title\": "${title}" }") echo "updated existing test case: ${res}" else # create new test case @@ -124,16 +124,16 @@ jobs: if [[ "${parent_suite_name}" == "manual" ]]; then: parent_suite_id="" else - res=$(curl -s -f --request GET --url "https://api.qase.io/v1/suite/LH" --data-urlencode "search=${str}" --header "Token: ${token}" --header "accept: application/json") + res=$(curl -s --request GET --url "https://api.qase.io/v1/suite/LH" --data-urlencode "search=${str}" --header "Token: ${token}" --header "accept: application/json") parent_suite_id=$(echo "$res" | jq .result.entities[0].id) fi echo "creating new test case ${title} under test suite ${parent_suite_name}(${parent_suite_id})" - res=$(curl --request POST -s -f \ - --url https://api.qase.io/v1/case/LH/ \ - --header "Token: ${token}" \ - --header "accept: application/json" \ - --header "content-type: application/json" \ - --data "{ \"description\": \"${description}\", \"title\": "${title}", \"suite_id\": \"${parent_suite_id}\" }") + #res=$(curl --request POST -s \ + # --url https://api.qase.io/v1/case/LH/ \ + # --header "Token: ${token}" \ + # --header "accept: application/json" \ + # --header "content-type: application/json" \ + # --data "{ \"description\": \"${description}\", \"title\": "${title}", \"suite_id\": \"${parent_suite_id}\" }") echo "created new test case ${title}: ${res}" fi done