@@ -39,37 +39,9 @@ async def test_status():
3939 timeout = 480 )
4040
4141
42- @base .bootstrapped
43- async def test_scp (event_loop ):
44- # ensure that asyncio.subprocess will work;
45- try :
46- asyncio .get_child_watcher ().attach_loop (event_loop )
47- except RuntimeError :
48- pytest .skip ('test_scp will always fail outside of MainThread' )
49- async with base .CleanModel () as model :
50- await model .add_machine ()
51- await asyncio .wait_for (
52- model .block_until (lambda : model .machines ),
53- timeout = 240 )
54- machine = model .machines ['0' ]
55- await asyncio .wait_for (
56- model .block_until (lambda : (machine .status == 'running' and
57- machine .agent_status == 'started' )),
58- timeout = 480 )
59-
60- with NamedTemporaryFile () as f :
61- f .write (b'testcontents' )
62- f .flush ()
63- await machine .scp_to (f .name , 'testfile' , scp_opts = '-p' )
64-
65- with NamedTemporaryFile () as f :
66- await machine .scp_from ('testfile' , f .name , scp_opts = '-p' )
67- assert f .read () == b'testcontents'
68-
69-
7042async def test_machine_ssh ():
7143 async with base .CleanModel () as model :
7244 machine : Machine = await model .add_machine ()
73- out = await machine .ssh ("echo hello world!" )
45+ out = await machine .ssh ("echo hello world!" , wait_for_active = True )
7446
7547 assert out == "hello world!\n "
0 commit comments