Skip to content

Commit

Permalink
fix gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
alperdedeoglu committed Oct 21, 2024
1 parent e36666a commit ae3ebb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/test/subscription-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ check_subaccount_removal() {

# Function to validate if the service broker registration is successful, with retry logic
validate_osb_registration() {
local CF_APP_NAME="susaas-api-$CF_SPACE-$CF_ORG"
local BROKER_NAME="susaas-api-$CF_SPACE-$CF_ORG"
local MAX_ATTEMPTS=3
local ATTEMPT=0
local INTERVAL=5 # Time in seconds between attempts
Expand All @@ -202,7 +202,7 @@ validate_osb_registration() {
echo "Validating OSB registration for $CF_APP_NAME..."

while (( ATTEMPT < MAX_ATTEMPTS )); do
RESPONSE=$(btp --format json list services/offering --subaccount "$SUBACCOUNT_GUID" --fields-filter "name eq '$CF_APP_NAME'")
RESPONSE=$(btp --format json list services/offering --subaccount "$SUBACCOUNT_GUID" --fields-filter "name eq '$BROKER_NAME'")

# Check if the response contains a valid offering
SERVICE_OFFERING_ID=$(echo "$RESPONSE" | jq -r '.[0].id')
Expand Down Expand Up @@ -257,6 +257,7 @@ if [[ -z "$SUBDOMAIN" || "$SUBDOMAIN" == "null" ]]; then
echo "Error: Failed to retrieve subdomain."
exit 1
fi
echo "Subdomain:$SUBDOMAIN"

echo "Fetching credentials for service key GUID $SERVICE_KEY_GUID..."

Expand Down

0 comments on commit ae3ebb1

Please sign in to comment.