Skip to content

Commit

Permalink
use common script to test
Browse files Browse the repository at this point in the history
  • Loading branch information
doombeaker committed Aug 8, 2024
1 parent 4893ef7 commit f4c6108
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
echo "Current directory: $(pwd)"
ls -l
sleep 10
python3 -m pytest -s --timeout=1800 tests/test_examples.py
python3 -m tests/test_examples.py
env:
PYTHONPATH: ${{ github.workspace }}/ComfyUI

Expand Down
27 changes: 13 additions & 14 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@
print(f"Test base path: {base_path}")


def test_comfyui():
# Wait for the page to load
print(f"wainting for comfyui to start")
time.sleep(10)
print(f"End wainting for comfyui to start")
# Wait for the page to load
print(f"wainting for comfyui to start")
time.sleep(10)
print(f"End wainting for comfyui to start")

chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")

driver = webdriver.Chrome(options=chrome_options)
driver.get(f"http://{COMFY_HOST}:{COMFY_PORT}")
driver = webdriver.Chrome(options=chrome_options)
driver.get(f"http://{COMFY_HOST}:{COMFY_PORT}")

# Add a cookie
driver.add_cookie({"name": "api_key", "value": BIZYAIR_KEY, "path": "/"})
# Add a cookie
driver.add_cookie({"name": "api_key", "value": BIZYAIR_KEY, "path": "/"})

driver.quit()
driver.quit()

0 comments on commit f4c6108

Please sign in to comment.