From 2f7c23667fdad9e63bf5bb19874a3dc83030c86d Mon Sep 17 00:00:00 2001 From: Caner Derici Date: Wed, 10 Jan 2024 11:16:18 -0700 Subject: [PATCH] Remove duplicate test in integration/test_machine ... already exists in integration/test_unit --- tests/integration/test_machine.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/tests/integration/test_machine.py b/tests/integration/test_machine.py index e8d2b2b1..f0f82c18 100644 --- a/tests/integration/test_machine.py +++ b/tests/integration/test_machine.py @@ -2,7 +2,6 @@ # Licensed under the Apache V2, see LICENCE file for details. import asyncio -from tempfile import NamedTemporaryFile import pytest @@ -37,31 +36,3 @@ async def test_status(): machine.status_message.lower() == 'running' and machine.agent_status == 'started')), timeout=480) - - -@base.bootstrapped -async def test_scp(): - # ensure that asyncio.subprocess will work; - try: - asyncio.get_child_watcher().attach_loop() - except RuntimeError: - pytest.skip('test_scp will always fail outside of MainThread') - async with base.CleanModel() as model: - await model.add_machine() - await asyncio.wait_for( - model.block_until(lambda: model.machines), - timeout=240) - machine = model.machines['0'] - await asyncio.wait_for( - model.block_until(lambda: (machine.status == 'running' and - machine.agent_status == 'started')), - timeout=480) - - with NamedTemporaryFile() as f: - f.write(b'testcontents') - f.flush() - await machine.scp_to(f.name, 'testfile', scp_opts='-p') - - with NamedTemporaryFile() as f: - await machine.scp_from('testfile', f.name, scp_opts='-p') - assert f.read() == b'testcontents'