fix e2e tests for garage v2 and uptimerobot v3 api changes
This commit is contained in:
+3
-5
@@ -404,10 +404,8 @@ cmd_garage() {
|
||||
|
||||
BUCKET_ID=$(echo "$BUCKET_RESP" | jq -r '.id')
|
||||
if [ -z "$BUCKET_ID" ] || [ "$BUCKET_ID" = "null" ]; then
|
||||
BUCKET_ID=$(curl -s -X POST "$GARAGE_API/v2/GetBucketInfo" \
|
||||
-H "$GARAGE_AUTH" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"globalAlias\": \"$APP\"}" | jq -r '.id')
|
||||
BUCKET_ID=$(curl -s "$GARAGE_API/v2/GetBucketInfo?globalAlias=$APP" \
|
||||
-H "$GARAGE_AUTH" | jq -r '.id')
|
||||
if [ -z "$BUCKET_ID" ] || [ "$BUCKET_ID" = "null" ]; then
|
||||
echo "Error: Failed to create or find bucket for $APP"
|
||||
echo "$BUCKET_RESP"
|
||||
@@ -500,7 +498,7 @@ cmd_monitor() {
|
||||
--data-urlencode "search=$APP")
|
||||
|
||||
MATCH=$(echo "$EXISTING" | jq -r --arg url "$MONITOR_URL" \
|
||||
'.monitors[]? | select(.url == $url) | .id')
|
||||
'.data[]? | select(.url == $url) | .id')
|
||||
if [ -n "$MATCH" ]; then
|
||||
echo " Monitor already exists (id: $MATCH), skipping."
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user