Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
9f39bcb6
Unverified
Commit
9f39bcb6
authored
Jun 20, 2024
by
perf3ct
Browse files
Fix /tags endpoint in postgres integration test
/api/health it is /health it is
parent
71a7750c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
.github/workflows/integration-test.yml
.github/workflows/integration-test.yml
+18
-20
No files found.
.github/workflows/integration-test.yml
View file @
9f39bcb6
...
...
@@ -43,7 +43,7 @@ jobs:
uses
:
cypress-io/github-action@v6
with
:
browser
:
chrome
wait-on
:
'
http://localhost:3000
'
wait-on
:
"
http://localhost:3000
"
config
:
baseUrl=http://localhost:3000
-
uses
:
actions/upload-artifact@v4
...
...
@@ -82,18 +82,18 @@ jobs:
--health-retries 5
ports
:
-
5432:5432
# mysql:
# image: mysql
# env:
# MYSQL_ROOT_PASSWORD: mysql
# MYSQL_DATABASE: mysql
# options: >-
# --health-cmd "mysqladmin ping -h localhost"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 3306:3306
# mysql:
# image: mysql
# env:
# MYSQL_ROOT_PASSWORD: mysql
# MYSQL_DATABASE: mysql
# options: >-
# --health-cmd "mysqladmin ping -h localhost"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 3306:3306
steps
:
-
name
:
Checkout Repository
uses
:
actions/checkout@v4
...
...
@@ -143,7 +143,6 @@ jobs:
exit 1
fi
-
name
:
Test backend with Postgres
if
:
success() || steps.sqlite.conclusion == 'failure'
env
:
...
...
@@ -172,7 +171,7 @@ jobs:
fi
# Check that service will reconnect to postgres when connection will be closed
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/
api/tags
)
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/
health
)
if [[ "$status_code" -ne 200 ]] ; then
echo "Server has failed before postgres reconnect check"
exit 1
...
...
@@ -184,13 +183,12 @@ jobs:
cur = conn.cursor(); \
cur.execute('SELECT pg_terminate_backend(psa.pid) FROM pg_stat_activity psa WHERE datname = current_database() AND pid <> pg_backend_pid();')"
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/
api/tags
)
status_code=$(curl --write-out %{http_code} -s --output /dev/null http://localhost:8081/
health
)
if [[ "$status_code" -ne 200 ]] ; then
echo "Server has not reconnected to postgres after connection was closed: returned status $status_code"
exit 1
fi
# - name: Test backend with MySQL
# if: success() || steps.sqlite.conclusion == 'failure' || steps.postgres.conclusion == 'failure'
# env:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment