jumpstarter-dev / jumpstarter

http://docs.jumpstarter.dev/
3 stars 3 forks source link

Rework and add test for pytest plugin #141

Closed NickCao closed 1 month ago

mangelajo commented 1 month ago

This is crashing with


test_on_rpi4.py::TestResource::test_setup_device
----------------------------------------------------------------------------- live log setup -----------------------------------------------------------------------------
INFO     jumpstarter.client.lease:lease.py:41 Leasing Exporter matching labels {'board': 'rpi4'} for seconds: 1800

INFO     jumpstarter.client.lease:lease.py:50 Lease ea8a0dad-428d-4e30-a0a2-55813d9e5261 created
INFO     jumpstarter.client.lease:lease.py:54 Polling Lease ea8a0dad-428d-4e30-a0a2-55813d9e5261
INFO     jumpstarter.client.lease:lease.py:59 Lease ea8a0dad-428d-4e30-a0a2-55813d9e5261 acquired
ERROR
test_on_rpi4.py::TestResource::test_tpm2_device ERROR
test_on_rpi4.py::TestResource::test_power_off_camera FAILED
test_on_rpi4.py::TestResource::test_power_on_camera FAILED
test_on_rpi4.py::TestResource::test_power_on_hdmi ERROR
test_on_rpi4.py::TestResource::test_login_console_hdmi ERROR
--------------------------------------------------------------------------- live log teardown ----------------------------------------------------------------------------
INFO     jumpstarter.client.lease:lease.py:71 Releasing Lease ea8a0dad-428d-4e30-a0a2-55813d9e5261

================================================================================= ERRORS =================================================================================
____________________________________________________________ ERROR at setup of TestResource.test_setup_device ____________________________________________________________

self = <test_on_rpi4.TestResource object at 0x7fbc573d4440>, client = <contextlib._GeneratorContextManager object at 0x7fbc5642e750>

    @pytest.fixture()
    def console(self, client):
>       with PexpectAdapter(client=client.dutlink.console) as console:
E       AttributeError: '_GeneratorContextManager' object has no attribute 'dutlink'

I am trying to figure out if it is due to this change.

NickCao commented 1 month ago

I am trying to figure out if it is due to this change. It is.

mangelajo commented 1 month ago

If I run it with env() it works, but the other path doesn't

NickCao commented 1 month ago

Pushed another fix.