5151TEST_BOX_URL = "generic/alpine315"
5252TEST_BOX_NAME = TEST_BOX_URL
5353TEST_PROVIDER = "virtualbox"
54+ TEST_DUMMY_BOX_URL = os .path .join (
55+ os .path .dirname (os .path .abspath (__file__ )), "tools" , f"dummy-{ TEST_PROVIDER } .box"
56+ )
5457# temp dir for testing.
5558
5659
@@ -77,7 +80,11 @@ def fixture_test_dir() -> Generator[str, None, None]:
7780 # Removes the directory created initially, runs once after the last test
7881 sys .stderr .write ("module teardown()\n " )
7982 if my_dir is not None :
80- subprocess .check_call ("vagrant destroy -f" , cwd = my_dir , shell = True )
83+ try :
84+ subprocess .check_call ("vagrant destroy -f" , cwd = my_dir , shell = True )
85+ except subprocess .CalledProcessError :
86+ pass
87+
8188 shutil .rmtree (my_dir )
8289
8390
@@ -459,7 +466,7 @@ def test_boxesvm(test_dir):
459466 b .name for b in v .box_list ()
460467 ], "There should be no dummy box before it's added."
461468 # Add a box
462- v .box_add (box_name , TEST_BOX_URL )
469+ v .box_add (box_name , TEST_DUMMY_BOX_URL )
463470
464471 # Test that there is a dummy box listed
465472 box_listing = v .box_list ()
@@ -600,7 +607,7 @@ def test_streaming_output(vm_dir):
600607 """
601608 Test streaming output of up or reload.
602609 """
603- test_string = "Waiting for machine to boot. "
610+ test_string = "Machine already provisioned "
604611 v = vagrant .Vagrant (vm_dir )
605612
606613 with pytest .raises (subprocess .CalledProcessError ):
0 commit comments