Skip to content

Commit

Permalink
use test-data data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
seanshahkarami committed Dec 15, 2023
1 parent 5cc0bd1 commit 97bd601
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/cloudscheduler/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
@pytest.fixture(autouse=True)
def wrap_tests():
# isolate cloud scheduler data between runs
data_dir = Path("data")
rmtree(data_dir)
data_dir = Path("test-data")
rmtree(data_dir, ignore_errors=True)
data_dir.mkdir(parents=True)

with ExitStack() as es:
proc = es.enter_context(
subprocess.Popen("./cloudscheduler", stdout=subprocess.PIPE)
subprocess.Popen(
["./cloudscheduler", "-data-dir", "test-data"], stdout=subprocess.PIPE
)
)
es.callback(proc.terminate)
for line in proc.stdout:
Expand Down

0 comments on commit 97bd601

Please sign in to comment.