diff --git a/fastly_compute/testing.py b/fastly_compute/testing.py index 8243243..ee12375 100644 --- a/fastly_compute/testing.py +++ b/fastly_compute/testing.py @@ -13,6 +13,7 @@ import threading import time from dataclasses import dataclass +from os import environ from pathlib import Path import pytest @@ -90,7 +91,14 @@ def viceroy_server(cls) -> ViceroyServer: # Start viceroy process process = subprocess.Popen( - ["viceroy", "serve", cls.WASM_FILE, "--addr", f"127.0.0.1:{port}", "-v"], + [ + environ.get("VICEROY", "viceroy"), + "serve", + cls.WASM_FILE, + "--addr", + f"127.0.0.1:{port}", + "-v", + ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True,