Skip to content

Commit 3e3cc71

Browse files
committed
fix: shell checks
1 parent 975345e commit 3e3cc71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/postman/scripts/transform-for-api-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ fi
2020

2121
# Test: Disable query params by default
2222
echo "Disabling query params by default test"
23-
if jq -e '.. | select(.request? != null).request.url.query[] | select(.disabled == true)' $COLLECTION_TRANSFORMED_FILE_NAME > /dev/null; then
23+
if jq -e '.. | select(.request? != null).request.url.query[] | select(.disabled == true)' "$COLLECTION_TRANSFORMED_FILE_NAME" > /dev/null; then
2424
echo "Test Passed: Query params disabled successfully."
2525
else
2626
echo "Test Failed: Query params disabling failed."
2727
fi
2828

2929
# Test: Remove _postman_id
30-
if ! jq -e '.collection.info._postman_id' $COLLECTION_TRANSFORMED_FILE_NAME > /dev/null; then
30+
if ! jq -e '.collection.info._postman_id' "$COLLECTION_TRANSFORMED_FILE_NAME" > /dev/null; then
3131
echo "Test Passed: _postman_id removed successfully."
3232
else
3333
echo "Test Failed: _postman_id removal failed."
3434
fi
3535

3636
# Test : Add baseUrl property
3737
echo "Adding baseUrl property test"
38-
if jq -e '.collection.variable[0] | (.key == "baseUrl" and has("value"))' $COLLECTION_TRANSFORMED_FILE_NAME > /dev/null; then
38+
if jq -e '.collection.variable[0] | (.key == "baseUrl" and has("value"))' "$COLLECTION_TRANSFORMED_FILE_NAME" > /dev/null; then
3939
echo "Test Passed: The first item in the variable array has key set to \"baseUrl\" and has a value property."
4040
else
4141
echo "Test Failed: The first item in the variable array does not have the expected key or value properties."

0 commit comments

Comments
 (0)