Fixed failing tests in machines and history cli, removed test_machines_api.py
This commit is contained in:
@@ -3,20 +3,25 @@ from cli import Cli
|
||||
from fixtures_flakes import FlakeForTest
|
||||
|
||||
|
||||
@pytest.mark.impure
|
||||
def test_machine_subcommands(
|
||||
test_flake: FlakeForTest, capsys: pytest.CaptureFixture
|
||||
test_flake_with_core: FlakeForTest, capsys: pytest.CaptureFixture
|
||||
) -> None:
|
||||
cli = Cli()
|
||||
cli.run(["--flake", str(test_flake.path), "machines", "create", "machine1"])
|
||||
cli.run(
|
||||
["--flake", str(test_flake_with_core.path), "machines", "create", "machine1"]
|
||||
)
|
||||
|
||||
capsys.readouterr()
|
||||
cli.run(["--flake", str(test_flake.path), "machines", "list"])
|
||||
cli.run(["--flake", str(test_flake_with_core.path), "machines", "list"])
|
||||
out = capsys.readouterr()
|
||||
assert "machine1\n" == out.out
|
||||
assert "machine1\nvm1\nvm2\n" == out.out
|
||||
|
||||
cli.run(["--flake", str(test_flake.path), "machines", "delete", "machine1"])
|
||||
cli.run(
|
||||
["--flake", str(test_flake_with_core.path), "machines", "delete", "machine1"]
|
||||
)
|
||||
|
||||
capsys.readouterr()
|
||||
cli.run(["--flake", str(test_flake.path), "machines", "list"])
|
||||
cli.run(["--flake", str(test_flake_with_core.path), "machines", "list"])
|
||||
out = capsys.readouterr()
|
||||
assert "" == out.out
|
||||
assert "vm1\nvm2\n" == out.out
|
||||
|
||||
Reference in New Issue
Block a user