Skip to content

Commit f434bc2

Browse files
committed
Address review comments
1 parent 410fbc2 commit f434bc2

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

test/scripts/e2e_subs/rest-participation-key.sh

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,19 @@ popd || exit 1
2323

2424
call_and_verify "Get List of Keys" "/v2/participation" 200 'address' 'effective-first-valid'
2525

26-
# Find out how many keys there are installed so far
27-
NUM_IDS_1=$(echo "$RES" | python3 -c 'import json,sys;o=json.load(sys.stdin);print(len(o))')
2826
RES=""
29-
3027
call_post_and_verify "Install a basic participation key" "/v2/participation" 200 ${NAME_OF_TEMP_PARTKEY} 'partId'
3128

3229
# Get the returned participation id from the RESULT (aka $RES) variable
3330
INSTALLED_ID=$(echo "$RES" | python3 -c 'import json,sys;o=json.load(sys.stdin);print(o["partId"])')
34-
RES=""
3531

3632
# Should contain the installed id
3733
call_and_verify "Get List of Keys" "/v2/participation" 200 'address' "${INSTALLED_ID}" 'address' 'effective-first-valid'
3834

39-
NUM_IDS_2=$(echo "$RES" | python3 -c 'import json,sys;o=json.load(sys.stdin);print(len(o))')
40-
RES=""
41-
42-
if [[ $((NUM_IDS_1 + 1)) -ne $NUM_IDS_2 ]]; then
43-
printf "\n\nFailed test. New number of IDs (%s) is not one more than old ID count(%s)\n\n" "${NUM_IDS_2}" "${NUM_IDS_1}"
44-
exit 1
45-
fi
46-
4735
call_and_verify "Get a specific ID" "/v2/participation/${INSTALLED_ID}" 200 "${INSTALLED_ID}"
4836

4937
# Should return 200 but not return that error message
5038
call_delete_and_verify "Delete the specific ID" "/v2/participation/${INSTALLED_ID}" 200 false 'participation id not found'
5139

5240
# Verify that it got called previously and now returns an error message saying that no key was found
5341
call_delete_and_verify "Delete the specific ID" "/v2/participation/${INSTALLED_ID}" 404 true 'participation id not found'
54-
55-
# Get list of keys
56-
call_and_verify "Get List of Keys" "/v2/participation" 200 'address' 'effective-first-valid'
57-
58-
NUM_IDS_3=$(echo "$RES" | python3 -c 'import json,sys;o=json.load(sys.stdin);print(len(o))')
59-
RES=""
60-
61-
if [[ "$NUM_IDS_3" -ne "$NUM_IDS_1" ]]; then
62-
printf "\n\nFailed test. New number of IDs (%s) is not equal to original ID count (%s)\n\n" "${NUM_IDS_3}" "${NUM_IDS_1}"
63-
exit 1
64-
fi
65-
66-

0 commit comments

Comments
 (0)