diff options
author | Rupali Jagtap <rupalijagtap@google.com> | 2024-04-16 14:39:12 -0700 |
---|---|---|
committer | Rupali Jagtap <rupalijagtap@google.com> | 2024-04-16 14:39:12 -0700 |
commit | 54ffca491746dac9cd457b308be5d4ffc360ec7c (patch) | |
tree | bbcf4099a456db53e466681b7c5c552654780df5 | |
parent | 21f72c669e880c04337f4d3e1bcbe5c6925a82e7 (diff) | |
download | adt-infra-54ffca491746dac9cd457b308be5d4ffc360ec7c.tar.gz |
Add e2e test for console exit command
BUG: b/334195140
Change-Id: I3ae6c1bdd73848ed6f27f1f9637021b7fb9c3f46
-rw-r--r-- | pytest/test_embedded/tests/console/test_console_avd.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pytest/test_embedded/tests/console/test_console_avd.py b/pytest/test_embedded/tests/console/test_console_avd.py index be2fbf62..52f92262 100644 --- a/pytest/test_embedded/tests/console/test_console_avd.py +++ b/pytest/test_embedded/tests/console/test_console_avd.py @@ -1,7 +1,7 @@ from pathlib import Path import pytest -from emu.timing import eventually +import emu.console.emulator_connection @pytest.mark.boot @@ -111,3 +111,13 @@ async def test_emulator_help_console_command(avd, telnet): for help_command in help_commands: assert help_command in result, "console help command failed" + + +@pytest.mark.e2e +@pytest.mark.sanity +async def test_emulator_exit_console_command(telnet): + try: + await telnet.send("exit") + assert False, "Emulator client connection did not close as expected" + except emu.console.emulator_connection.EmulatorClientEOF: + pass # Connection closed successfully |