Skip to content

Commit

Permalink
debug(iter-3)!: gh workflow for e2e
Browse files Browse the repository at this point in the history
fixed the failing curl test checking

Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed May 28, 2024
1 parent 88f2952 commit 0de3cdd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:

- name: header
run: |
echo -e "\e[1;33m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\e[0m
echo -e "\e[1;33m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\e[0m
\e[1;33m┃\e[0m \e[1;36m Migration from v0.9.0 to latest \e[0m \e[1;33m┃\e[0m
\e[1;33m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
\e[1;33m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
- name: install frappe from v0.9.0
run: |
Expand Down Expand Up @@ -71,9 +71,9 @@ jobs:
sudo apt install -y jq curl
- name: header
run: |
echo -e "\e[1;33m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\e[0m
echo -e "\e[1;33m┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\e[0m
\e[1;33m┃\e[0m \e[1;36m Migration from latest~1 to latest \e[0m \e[1;33m┃\e[0m
\e[1;33m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
\e[1;33m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
- name: install frappe previous the latest release
run: |
Expand Down
32 changes: 6 additions & 26 deletions test/fm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,12 @@ CreateSite() {

TestSiteReachability() {
local siteName="$1"
local max_retries=9
local retry_delay=2
local attempt=0

while (( attempt < max_retries ))
do
attempt=$(( attempt + 1 ))
echo "Attempt $attempt of $max_retries..."

curl -f \
--head \
-H "Host: $siteName" \
-H "Cache-Control: no-cache,no-store" \
http://localhost:80

if [ $? -eq 0 ]; then
echo "Curl succeeded for $siteName"
return
else
echo "Failed to curl $siteName. Retrying in $retry_delay seconds..."
sleep $retry_delay
fi
done

echo "Curl failed after $max_retries attempts."
exit 255
curl -f \
--retry 18 --retry-max-time 600 \
--head \
-H "Host: $siteName" \
-H "Cache-Control: no-cache,no-store" \
http://localhost:80
}

MigrationToLatest() {
Expand Down

0 comments on commit 0de3cdd

Please sign in to comment.