from k1link.device_plugins.xgrids_k1.net.snapshot import command_record, snapshot


def test_command_record_captures_success() -> None:
    result = command_record(["/usr/bin/true"])
    assert result["returncode"] == 0
    assert result["error"] is None


def test_snapshot_is_explicitly_sensitive() -> None:
    result = snapshot()
    assert result["schema_version"] == 1
    assert "do not commit" in result["sensitivity"]
    assert [record["argv"] for record in result["commands"]][-1] == ["arp", "-an"]
