forked from clan/clan-core
api: fix breaking tests
This commit is contained in:
parent
522fd1bcaa
commit
f54c518fd7
@ -26,6 +26,14 @@ def test_create_flake(
|
||||
cli.run(["machines", "create", "machine1"])
|
||||
capsys.readouterr() # flush cache
|
||||
|
||||
# create a hardware-configuration.nix that doesn't throw an eval error
|
||||
|
||||
for patch_machine in ["jon", "sara"]:
|
||||
with open(
|
||||
flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix", "w"
|
||||
) as hw_config_nix:
|
||||
hw_config_nix.write("{}")
|
||||
|
||||
cli.run(["machines", "list"])
|
||||
assert "machine1" in capsys.readouterr().out
|
||||
flake_show = subprocess.run(
|
||||
|
@ -18,8 +18,8 @@ def test_machine_subcommands(
|
||||
out = capsys.readouterr()
|
||||
|
||||
assert "machine1" in out.out
|
||||
assert "nvm1" in out.out
|
||||
assert "nvm2" in out.out
|
||||
assert "vm1" in out.out
|
||||
assert "vm2" in out.out
|
||||
|
||||
cli.run(
|
||||
["--flake", str(test_flake_with_core.path), "machines", "delete", "machine1"]
|
||||
@ -30,5 +30,5 @@ def test_machine_subcommands(
|
||||
out = capsys.readouterr()
|
||||
|
||||
assert "machine1" not in out.out
|
||||
assert "nvm1" in out.out
|
||||
assert "nvm2" in out.out
|
||||
assert "vm1" in out.out
|
||||
assert "vm2" in out.out
|
||||
|
Loading…
Reference in New Issue
Block a user