Skip to content

Commit 2df6dd8

Browse files
committed
Make test framework respect the VICEROY env var.
…like the Makefile does.
1 parent f1bd043 commit 2df6dd8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

fastly_compute/testing.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import threading
1414
import time
1515
from dataclasses import dataclass
16+
from os import environ
1617
from pathlib import Path
1718

1819
import pytest
@@ -90,7 +91,14 @@ def viceroy_server(cls) -> ViceroyServer:
9091

9192
# Start viceroy process
9293
process = subprocess.Popen(
93-
["viceroy", "serve", cls.WASM_FILE, "--addr", f"127.0.0.1:{port}", "-v"],
94+
[
95+
environ.get("VICEROY", "viceroy"),
96+
"serve",
97+
cls.WASM_FILE,
98+
"--addr",
99+
f"127.0.0.1:{port}",
100+
"-v",
101+
],
94102
stdout=subprocess.PIPE,
95103
stderr=subprocess.STDOUT,
96104
text=True,

0 commit comments

Comments
 (0)