mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-05 02:17:31 +00:00
fix(tests): handle http URLs as aliases for server mode (#4306)
Small fix needed for llama-stack-ops which invokes integration-tests.sh against docker by using a `http://` URL for stack-config
This commit is contained in:
parent
1d9349c8d6
commit
c6609a84f5
1 changed files with 12 additions and 12 deletions
|
|
@ -161,7 +161,7 @@ echo "Setting SQLITE_STORE_DIR: $SQLITE_STORE_DIR"
|
||||||
|
|
||||||
# Determine stack config type for api_recorder test isolation
|
# Determine stack config type for api_recorder test isolation
|
||||||
if [[ "$COLLECT_ONLY" == false ]]; then
|
if [[ "$COLLECT_ONLY" == false ]]; then
|
||||||
if [[ "$STACK_CONFIG" == server:* ]] || [[ "$STACK_CONFIG" == docker:* ]]; then
|
if [[ "$STACK_CONFIG" == server:* ]] || [[ "$STACK_CONFIG" == docker:* ]] || [[ "$STACK_CONFIG" == http://* ]]; then
|
||||||
export LLAMA_STACK_TEST_STACK_CONFIG_TYPE="server"
|
export LLAMA_STACK_TEST_STACK_CONFIG_TYPE="server"
|
||||||
echo "Setting stack config type: server"
|
echo "Setting stack config type: server"
|
||||||
else
|
else
|
||||||
|
|
@ -219,7 +219,7 @@ fi
|
||||||
find_available_port() {
|
find_available_port() {
|
||||||
local start_port=$1
|
local start_port=$1
|
||||||
local port=$start_port
|
local port=$start_port
|
||||||
for ((i=0; i<100; i++)); do
|
for ((i = 0; i < 100; i++)); do
|
||||||
if ! lsof -Pi :$port -sTCP:LISTEN -t >/dev/null 2>&1; then
|
if ! lsof -Pi :$port -sTCP:LISTEN -t >/dev/null 2>&1; then
|
||||||
echo $port
|
echo $port
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue